If authentication fails, the API returns
401 Unauthorized.
Credential handling
- Create API keys in the merchant dashboard.
- Store
X-Api-Secretin a secret manager. - Never expose API secrets in mobile apps, browsers, logs, or public repositories.
- Rotate or revoke credentials from the dashboard if a secret is exposed.
IP allowlist
You can restrict an API key to your servers’ IP addresses. In the merchant dashboard, open Developers → API keys and choose IP allowlist. Enter up to 20 IP addresses or CIDR ranges, such as203.0.113.7 or 198.51.100.0/24, one per line.
When a key has an allowlist, requests from any other IP are rejected with 403 Forbidden and reason ip_not_allowed. Keys with an empty allowlist accept requests from any IP. You can also set the allowlist when you create the key.