Developer docs
Authentication
Every API request is authorised with an API key made of a key ID and a secret. Keys belong to your merchant account and can be revoked at any time.
Generate a key
- Log in to your dashboard and open API keys.
- Create a key and give it a label, such as "Production server".
- Copy the key ID and the secret.
The secret is shown only once. We store only a hash of it, so we cannot show it again. If you lose it, create a new key and revoke the old one.
Owners, Admins and Developers on your team can create keys.
Key format
| Part | Looks like | Purpose |
|---|---|---|
| Key ID | fp_test_pk_… | Identifies the key. Safe to log. |
| Key secret | fp_test_sk_… | Proves you own the key. Keep it private. |
The test in the prefix marks a test-mode key. See Test mode.
Authorise a request
Send both parts in the Authorization header, joined by a colon, as a Bearer token:
Authorization: Bearer <KEY_ID>:<KEY_SECRET>What can go wrong
| Status | Message | Meaning |
|---|---|---|
| 401 | Missing API key… | No Authorization: Bearer header was sent. |
| 401 | Malformed API key | The token is not in keyId:keySecret form. |
| 401 | Invalid or revoked API key | The key ID does not exist, or the key has been revoked. |
| 401 | Invalid API key | The secret does not match the key ID. |
| 403 | Merchant account is not active | Your account is not approved yet, or has been suspended. |
Keep keys safe
- Call the API only from your server. Never put a secret in a browser or mobile app.
- Keep secrets in environment variables or a secrets manager, not in source control.
- Use a separate key for each system, so you can revoke one without affecting the others.
- Revoke a key from the dashboard the moment you suspect it has leaked. A revoked key stops working.