Overview
Direct API integration gives you complete control over the payment lifecycle through server-to-server REST API calls. This approach is ideal for backend-driven systems, recurring payments, or scenarios where you manage your own checkout UI.Payment Flow
The Direct API payment flow consists of three steps:Create a checkout session
Every payment starts with a checkout session that groups the transaction context:The response includes a
checkout_session ID used in subsequent API calls.Tokenize payment data
For card payments, create a one-time token with the raw card data:For alternative payment methods (PIX, bank transfers), tokenization is not required.
Create the payment
Authentication
All API requests require two authentication headers:| Header | Description |
|---|---|
public-api-key | Your public API key. |
private-secret-key | Your private secret key. Server side only. |
account_id value from the Dashboard is not an HTTP header. Place it inside the account_id field of request bodies on endpoints like POST /v1/checkout/sessions and POST /v1/payments.
Never expose your
private-secret-key in client-side code or version control. Use environment variables.Base URLs
| Environment | Base URL |
|---|---|
| Sandbox | https://api-sandbox.y.uno |
| Production | https://api.y.uno |
Next Steps
Create a Payment
Detailed payment creation with method-specific examples.
Capture & Cancel
Two-step authorization flows.
Refunds
Process full and partial refunds.
Webhooks
Receive real-time payment notifications.