RASPAY

Authentication

How to authenticate requests with API keys.

Send the API key in the Authorization header as a Bearer token. Every /v1 route requires authentication. The prefix defines the environment:

PrefixEnvironmentEffect
sk_test_TestSimulated data and balance.
sk_live_LiveReal money. Requires an approved account.
Authenticated request
curl "https://api.raspay.io/v1/balance" \
  -H "Authorization: Bearer sk_test_..."

Manage keys

  • Create and revoke keys in the dashboard, under Developers, on the API keys screen. The full key is shown only once.
  • We store only the hash. If you lose the key, revoke it and create another one.
  • Revocation takes effect immediately for all following requests.
  • To accept the key only from your server IPs, fill in Allowed IPs on the same screen (one IP or CIDR range per line). The list applies to all keys of the account; a call from another IP gets 403 ip_not_allowed.

Authentication failures

A missing, invalid or revoked key returns 401 unauthorized. An account under review using a live key gets 403 account_not_active on charge and payout operations.

401
{
  "error": {
    "code": "unauthorized",
    "message": "Chave de API ausente ou inválida."
  }
}