Secret keys
Every request must include your secret key as a Bearer token:
Authorization: Bearer sk_test_replace_me
The key prefix selects the environment:
| Prefix | Environment | Notes |
|---|
sk_test_… | Test | For use against staging. |
sk_live_… | Live | For use against production. |
On production, test keys are rejected. On staging, only live-style
behaviour is served. Keep your secret keys server-side — never ship them in
client apps or commit them to source control.
Many routes act on behalf of a specific merchant customer (a buyer or seller you
manage). These require a customer-id header alongside your secret key:
Authorization: Bearer sk_test_replace_me
customer-id: 665f1b2c9a1e4d0012ab3c01
Routes that require customer-id include wallet, confirm-payment, milestone
confirm, disputes (per-customer), payments, cards, and the crypto whitelist.
Merchant super-admin routes
Routes under Merchant Customers require the API key to belong to a merchant
super-admin account. A regular customer key cannot create or manage other
customers.
Common auth errors
| Status | Message | Cause |
|---|
401 | No token provided | Missing Authorization header. |
401 | Access denied | Key is valid but not permitted for this action. |
400 | customer-id header is required | Route needs a customer-id header. |