Skip to content
StampyWalletDocs
API and webhooks / Reference / Add a visit

Add a visit

POST /v1/passages adds a stamp or points to a customer's card from your POS, and tells you whether a reward is earned.

POST/v1/passages

The equivalent of a scan at the counter, sent by your POS: one stamp (or several), or points. The rules and limits are those of the counter, the customer's card updates in their Wallet, and the visit counts like any other (regulars, reminders, review request).

Body (JSON)

clientobjectrequired
Who gets the visit: one of id, carte (the card code), email or telephone.
montantnumberoptional
Receipt amount, in units (12.5 for €12.50). If the business has a "€10 = 1 stamp" rule, the amount takes precedence over quantite; in points mode, it is converted with the business's points-per-euro rule.
quantiteintegeroptional
Stamps and tiers modes: number of stamps, 1 by default, 50 at most.
pointsintegeroptional
Points mode, without an amount: the points to add. By default, the business's value.
referencestringoptional
The receipt number. A reference only adds a stamp once per business.
creer_si_absentbooleanoptional
true: an unknown customer, identified by email or telephone, is created (with prenom and nom if they are in client). Default false.
conditions_accepteesbooleanoptional
When the business requires its terms and creer_si_absent creates the customer (in client or at the root).

Example

curl https://app.stampywallet.com/v1/passages \
  -H "Authorization: Bearer sw_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "client": { "telephone": "+33612345678", "prenom": "Léa" },
    "montant": 12.5,
    "reference": "TICKET-4512",
    "creer_si_absent": true
  }'

Response

201 Created
{
  "passage": {
    "id": "226fdea1-ba59-49fb-93e6-60a14a765134",
    "client_id": "c2a91f3e-7d40-4b8a-a3c5-91e0d6f4b2c7",
    "valeur": 1,
    "montant": 12.5,
    "reference": "TICKET-4512",
    "cree_le": "2026-10-22T09:20:00.000Z"
  },
  "rejoue": false,
  "client_cree": false,
  "recompense_atteinte": true,
  "recompenses_gagnees": 1,
  "plafonne": false,
  "client": { "id": "c2a91f3e-7d40-4b8a-a3c5-91e0d6f4b2c7", "prenom": "Léa", "etat": { "tampons": 0, "objectif": 10 } }
}
FieldMeaning
passage.valeurThe stamps or points added
passage.montantThe recorded amount, or null
rejouetrue when the reference had already been used: the response is then 200 and returns the original visit, without adding a stamp a second time
client_creetrue if creer_si_absent created the customer
recompense_atteinte, recompenses_gagneesThis visit earns a reward (or several): to give when the customer takes it
plafonnetrue if the value was brought down to the counter's cap
clientThe customer object after the visit

Refusals

StatuscodeWhen
404client_introuvableNo customer matches, and creer_si_absent is not true
409trop_totA visit from the same customer happened less than the business's double-visit delay ago (90 seconds by default)
422montant_insuffisantThe amount does not make one stamp (or one point)
422conditions_requisesThe customer would be created, but the business's terms are not accepted

Warning : always give a reference (the receipt number): a POS that retries after a connection drop does not add two stamps. A reference whose visit was cancelled cannot be used again.

Updated

Was this page helpful?