/v1/* endpoints require a Bearer token in the Authorization header.
Obtaining credentials
- Log in to the YuvexPay dashboard.
- Navigate to Settings > API Credentials.
- Click Create credential and choose the environment (sandbox or production).
- Save the
client_idandclient_secretsecurely.
Generating a token
Exchange your credentials for an access token using the OAuth 2.0 client credentials flow:Response
Using the token
Include the token in theAuthorization header of every API request:
Token lifecycle
| Property | Value |
|---|---|
| Expiration | 1 hour (3600 seconds) |
| Max active tokens | 2 per credential |
| Access token prefix | ypt_ |
| Production client_secret prefix | sk_prod_ |
| Sandbox client_secret prefix | sk_sandbox_ |
Environments
The same API URL (https://api.yuvexpay.com) serves both production and sandbox requests. The environment is determined by which credentials you use to generate the token:
- Production credentials use
sk_prod_*client secrets and produceypt_*bearer tokens that process real transactions. - Sandbox credentials use
sk_sandbox_*client secrets and produceypt_*bearer tokens that simulate transactions without moving real money.