Skip to content
StampyWalletDocs
API and webhooks / Reference / Create a customer

Create a customer

POST /v1/clients signs a customer up to the loyalty program and returns their card link, to send them by SMS or email.

POST/v1/clients

Signs a customer up, as if they had scanned the poster, and returns the customer object with lien_carte: the page where they add their card to Apple Wallet or Google Wallet. The business's welcome stamps are added, as at sign-up.

Body (JSON)

prenomstringoptional
Customer's first name, shown on their card.
nomstringoptional
Last name.
telephonestringoptional
A mobile number, in the business's country format or international (+33612345678). Otherwise 400 telephone_invalide.
emailstringoptional
Email address.
conditions_accepteesbooleanoptional
Required (true) when the business requires its terms (conditions_exigees from GET /v1/commerce); otherwise 422 conditions_requises.

Warning : this route does not deduplicate: called twice, it creates two customers. Search first with GET /v1/clients, or go straight through POST /v1/passages with creer_si_absent: true, which only creates the customer if they don't exist.

A customer created through the API is never subscribed to promotional SMS: they have not been informed about them.

Example

curl https://app.stampywallet.com/v1/clients \
  -H "Authorization: Bearer sw_live_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: inscription-0412" \
  -d '{"prenom": "Léa", "telephone": "+33612345678"}'

Response

201 Created and the customer object, for example:

201 Created
{
  "id": "c2a91f3e-7d40-4b8a-a3c5-91e0d6f4b2c7",
  "prenom": "Léa",
  "nom": null,
  "telephone": "+33612345678",
  "email": null,
  "carte": "X7k2pQ9mLw",
  "lien_carte": "https://stampywallet.com/c/X7k2pQ9mLw",
  "cree_le": "2026-10-25T10:41:52.120Z",
  "etat": { "mode": "tampons", "tampons": 1, "points": null, "objectif": 10, "restants": 9,
            "prochaine_recompense": { "seuil": 10, "libelle": "A free baguette" },
            "recompenses_disponibles": [], "recompenses_obtenues": 0,
            "dernier_passage": null, "premium": null }
}

Note : send lien_carte to the customer through the channel of your choice: StampyWallet does not message them at this step.

Updated

Was this page helpful?