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.

  1. 1Balance, payments, withdrawals and transactions always use the wallet of the account that owns the key.
  2. 2A key can only do what its owner's role can do today. If the role changes, the key's permissions change with it.
  3. 3Looking up a transaction that belongs to another account returns 404, even if you know its ID.
  4. 4Revoking a key stops it immediately. Your wallet and past transactions are not affected.
  5. 5Webhooks only receive events for your own account (and, for merchants, their own agents).

Request headers

HeaderValue
X-API-KeyYour public key ID, starting with xxp_pk_
X-API-SecretYour secret, starting with xxp_sk_
Content-Typeapplication/json (for POST requests)
Idempotency-KeyRequired for Tag Payment creation. Send a unique 8–200 character value for each intended Tag Payment.
bash
curl https://api.xxpayus.online/api/v1/wallet/balance \
  -H "X-API-Key: xxp_pk_your_key_id" \
  -H "X-API-Secret: $XXPAYUS_API_SECRET"

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:

EndpointAllowed roles
POST /payments/createAgent
GET /transactions/{id}Merchant, Agent
GET /wallet/balanceMerchant, Agent
POST /withdrawals/requestMerchant, Agent
POST /tag-payments/createAgent
POST /agents/createMerchant
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.