/api/v1/* endpoints. Every request to the public API must include a valid key in the Authorization header. Keys are scoped to specific resources and can be created in either live or test mode, giving you full control over what each integration can access.
Key format
Keys follow a fixed prefix convention so you can identify them at a glance:| Prefix | Mode |
|---|---|
ck_live_ | Live mode — real payments, real funds |
ck_test_ | Test mode — development and staging |
Creating a key
Open Dashboard → API Keys
Click API Keys in the left sidebar. The page lists all existing keys with their prefix, scopes, mode, last-used timestamp, and status.
Name the key and choose a mode
Give the key a descriptive name (for example,
Production server or WooCommerce plugin). Select Live for production use or Test for development and staging environments.Select scopes
Choose the minimum set of scopes your integration needs. See the scopes table below for a full list of what each scope grants.
Available scopes
| Scope | Access |
|---|---|
links:read | List and retrieve payment links |
links:write | Create, update, and delete payment links |
sessions:read | List and retrieve checkout sessions |
sessions:write | Create checkout sessions |
webhooks:read | List and retrieve webhook endpoints |
webhooks:write | Create and delete webhook endpoints |
events:read | List and retrieve events |
customers:read | List and retrieve customers |
customers:write | Create and update customers |
Using a key
Include the raw key as a Bearer token in every request:curl:
Revoking a key
To revoke a key, find it in the API Keys list and click Revoke. Revocation is immediate — any subsequent request using that key will receive a401 Unauthorized response. Revoked keys remain visible in the list with a revoked timestamp for audit purposes but cannot be reinstated.
Key list details
The API Keys page shows the following for each key:| Column | Description |
|---|---|
| Name | The label you assigned at creation |
| Prefix | The first several characters of the key (e.g. ck_live_abc123) for identification |
| Mode | Live or test |
| Scopes | The permissions assigned to this key |
| Last used | Timestamp of the most recent successful authentication |
| Created | When the key was generated |
| Status | Active or revoked |
Best practices
Following these practices limits the blast radius of a leaked key and makes it easier to rotate credentials without downtime.
- One key per integration. Create a separate key for your WooCommerce plugin, your backend server, and any other consumer. This lets you revoke a single integration without affecting others.
- Use test keys during development. Switch to a
ck_test_key in your staging and local environments so accidental misfires never touch real payments. - Apply minimal scopes. Request only the scopes each integration needs. A webhook consumer only needs
webhooks:read; a session creator only needssessions:write. - Rotate keys periodically. Create a new key, update your integration, then revoke the old key. Both keys can coexist briefly during the cutover.
- Never expose keys client-side. API keys are for server-to-server use only. Do not embed them in browser JavaScript, mobile apps, or public repositories.