Overview
| Aspect | Details |
|---|---|
| Authentication method | Bearer token |
| Header | Authorization: Bearer YOUR_TOKEN |
| Token format | 32-character hex string |
| Account scoping | Each token is tied to one account |
| Sandbox support | Tokens can be scoped to a specific sandbox |
Obtaining an API token
Option 1: Via the dashboard (recommended)
- Navigate to API Tokens in the account settings.
- Click New API Token.
- Enter a name for the token.
- The token value is displayed once after creation — copy it immediately.
Option 2: Via the auth endpoint
Exchange email and password credentials for an API token programmatically.The user’s email address.
The user’s password.
The six-digit one-time password from the user’s authenticator app. Required when the user has two-factor authentication enabled.
Request
Success response (200 OK)
Error responses
Invalid credentials (401 Unauthorized):otp_attempt parameter:
Authenticating API requests
Include the token in theAuthorization header of every API request:
Authentication header format
token keyword:
Missing or invalid token (401 Unauthorized)
Requests without a valid token receive an empty401 Unauthorized response:
Account scoping
Each API token is tied to a specific account. All API requests are automatically scoped to that account’s data:- Customers returned are only those belonging to the token’s account.
- Invoices, products, prices, and other resources are similarly scoped.
- Tokens cannot access data from other accounts.
Token usage tracking
Each time a token is used for authentication, itslast_used_at timestamp is updated. This is visible in the dashboard for auditing purposes.
Sandbox mode
API tokens can be created within a sandbox environment for testing purposes.Production tokens access only production data. Sandbox tokens access only sandbox data. The sandbox association is set when the token is created.
How it works
- Production tokens (no sandbox) access only production data.
- Sandbox tokens access only sandbox data.
- The sandbox association is set when the token is created.
Creating a sandbox token
Create an API token while in sandbox mode through the dashboard. The token will automatically be scoped to that sandbox and will only return sandbox data.Token management
Listing tokens
View all API tokens for an account in the dashboard at API Tokens.Revoking a token
Delete an API token from the dashboard to immediately revoke access. Any requests using that token will receive a401 Unauthorized response.
Code examples
Available API endpoints
All endpoints require authentication unless noted otherwise.| Endpoint | Methods | Description |
|---|---|---|
/v1/auth | POST | Obtain API token (no auth required) |
/v1/me | GET | Current user info |
/v1/accounts | CRUD | Account management |
/v1/customers | CRUD | Customer management |
/v1/products | CRUD | Product management |
/v1/prices | CRUD | Price management |
/v1/invoices | CRUD | Invoice management |
/v1/subscriptions | CRUD | Subscription management |
/v1/webhook_endpoints | CRUD | Webhook endpoint management |
/v1/crypto_transactions | GET, POST | Crypto transaction records |
/v1/crypto_addresses | GET, POST, DELETE | Crypto address management |
/v1/crypto_payment_claims | GET | Payment claim records |
/v1/crypto_payment_claims/:id/approval | POST | Approve a claim |
/v1/crypto_payment_claims/:id/rejection | POST | Reject a claim |
/v1/wallets | GET | Wallet information |
/v1/payment_claim_links | GET, POST, DELETE | Payment claim links |
Best practices
- Store tokens securely — never commit tokens to source control or expose them in client-side code.
- Use environment variables to store tokens in your application.
- Create separate tokens for different integrations or environments.
- Revoke unused tokens promptly when they are no longer needed.
- Use sandbox tokens for development and testing to avoid affecting production data.
- Monitor usage by checking
last_used_atin the dashboard for unusual activity.