Sommaire · Clients

Clients

Un client regroupe les paiements d’une même personne. Il est créé automatiquement quand un paiement porte un téléphone (un client par téléphone et par marchand), ou explicitement par l’API. Les données personnelles sont chiffrées ; le téléphone est renvoyé masqué.

POST/v1/customers

Permission customers:write.
ParamètreTypeDescription
phonefacultatifchaîneFormat international (+221…). Un même téléphone ne peut exister qu’une fois (409 CUSTOMER_ALREADY_EXISTS).
namefacultatifchaîne ≤ 120Nom.
emailfacultatifemailEmail.
externalReffacultatifchaîne ≤ 120Votre identifiant de ce client.
cURL
curl -sX POST https://backend.v1.pay.galsen.tech/v1/customers \
  -H "Authorization: Bearer $GALSEN_SECRET_KEY" -H "Content-Type: application/json" \
  -d '{ "phone": "+221771234567", "name": "Awa Diop", "externalRef": "client-42" }'

Pour l’utiliser dans un paiement : "customer": { "id": "<id du client>" }.

GET/v1/customers · /v1/customers/{id}

Permission customers:read. Objet : id, externalRef, name, email, phone (masqué), createdAt.

DELETE/v1/customers/{id}

Permission customers:write. Anonymise le client.

Droit à l’effacement

L’anonymisation détruit définitivement le nom, l’email et le téléphone. Les paiements restent dans votre comptabilité, rattachés à un client sans données personnelles.