Authorization header of every API request.
How to authenticate
Add theAuthorization header to your requests:
Getting a token
Tokens are issued when you sign in to Cleo Pay. Once authenticated, you can retrieve a session token from the Cleo Pay application context to use in API requests. For automated or server-to-server use, generate a long-lived token from your Cleo Pay account settings.Token expiry
Session tokens are short-lived. When a token expires, the API returns401 Unauthorized. To continue making requests, sign in again to get a fresh token.
Your application should handle 401 responses by refreshing the token and retrying the request.
Error responses
| Status | Meaning |
|---|---|
401 Unauthorized | The token is missing, malformed, or expired. Re-authenticate to get a new token. |
403 Forbidden | The token is valid but the authenticated user does not have permission to access the requested resource. Check that your account has the necessary role. |
Example: authenticated request
Response
Next steps
- Quick Start — Use your token to make your first payment.
- API Reference — Explore all available endpoints.