Skip to content
StampyWalletDocs
API and webhooks / Get started / Authentication

Authentication

Every API call carries a secret sw_live_ key, created in Settings › Integrations and shown only once. 120 requests per minute per key.

Create a key

  1. Open Settings › Integrations in your StampyWallet account (the owner or a manager).
  2. Create a key and give it a name that says where it is used ("Counter POS", "Website").
  3. Copy it right away. It starts with sw_live_ and is shown in full only once: StampyWallet only keeps a fingerprint of it. If lost, it cannot be recovered: revoke it and create another one.

Send it with every call

The key goes in the Authorization header, after the word Bearer:

Header
Authorization: Bearer sw_live_4f9c2a7e1b...

A key gives access to one business: the one it was created in. If you manage several locations, create a key in each one.

Warning : the key acts on your behalf: it creates customers and adds visits. Keep it on the server side (environment variable, secrets vault), never in the code of a web page or a mobile app, never in a Git repository.

Revoke a key

In Settings › Integrations, revoke the key: calls carrying it fail immediately with 401 and the code cle_revoquee. Do it as soon as a key may have leaked, or when a provider no longer needs it.

Access errors

StatuscodeWhen
401non_authentifieMissing header or unknown key
401cle_revoqueeThe key has been revoked
403formule_requiseThe business is not on the Growth plan (the API is included in it, and open during the trial)
403interditThe action is not allowed for this business
429trop_de_requetesMore than 120 requests per minute with this key

Rate limit

120 requests per minute per key. Beyond that, the response is 429 with the header Retry-After: 60: wait that number of seconds before trying again. An ordinary POS is very far from it.

The error format in detail is on the Errors page.

Updated

Was this page helpful?