Start
Authentication
Every API request is authenticated with an API key ID and secret sent as headers.
Account & wallet context
Your XXPayUS API credentials are linked to your XXPayUS account. XXPayUS works out your account and wallet from the key on every request, so you never send a source wallet or account ID.
- 1Balance, payments, withdrawals and transactions always use the wallet of the account that owns the key.
- 2A key can only do what its owner's role can do today. If the role changes, the key's permissions change with it.
- 3Looking up a transaction that belongs to another account returns 404, even if you know its ID.
- 4Revoking a key stops it immediately. Your wallet and past transactions are not affected.
- 5Webhooks only receive events for your own account (and, for merchants, their own agents).
Request headers
| Header | Value |
|---|---|
| X-API-Key | Your public key ID, starting with xxp_pk_ |
| X-API-Secret | Your secret, starting with xxp_sk_ |
| Content-Type | application/json (for POST requests) |
| Idempotency-Key | Required for Tag Payment creation. Send a unique 8–200 character value for each intended Tag Payment. |
Secret API credentials must only be used from your server. Never put them in browser JavaScript, client-side environment variables, mobile app source code, public Git repositories or URLs.
How keys are stored
XXPayUS stores only a SHA-256 hash of your secret. The full secret is shown once when the key is created and can never be retrieved again. If you lose it, create a new key and revoke the old one.
Account roles
A key acts with the role of the account that created it. Some endpoints require a specific role:
| Endpoint | Allowed roles |
|---|---|
| POST /payments/create | Agent |
| GET /transactions/{id} | Merchant, Agent |
| GET /wallet/balance | Merchant, Agent |
| POST /withdrawals/request | Merchant, Agent |
| POST /tag-payments/create | Agent |
| POST /agents/create | Merchant |
| GET /agents/provisioning/{id} | Merchant |
Rate limits
Each API key may make up to 120 requests per rolling 60 seconds. Beyond that the API returns 429 Too Many Requests; wait a moment and retry.
Revoking keys
Revoked keys stop working immediately and return 401 Invalid or revoked API key.