1. 401 INVALID_CREDENTIALS — Wrong API keys
Symptom Every API call returns401 INVALID_CREDENTIALS, even when credentials appear to be set correctly.
Root cause
Sandbox and production credentials are completely separate. Using a production private-secret-key against https://api-sandbox.y.uno/v1 (or vice versa) will always return 401 — there is no fallback or cross-environment validation. This is also triggered by copy-paste errors that include trailing whitespace or line breaks.
Fix
- Open Dashboard > Settings > API Keys.
- Confirm you are viewing the correct environment tab (Sandbox or Production).
- Copy
public-api-key,private-secret-key, andaccount-codefresh from the dashboard. - Ensure the values are trimmed — no leading/trailing whitespace.
- Confirm the base URL matches the environment:
https://api-sandbox.y.uno/v1for sandbox.
Never use
public-api-key alone for server-side API calls. Payment creation and management endpoints require private-secret-key.2. 403 AUTHORIZATION_REQUIRED — Missing account-code header
Symptom The request returns403 AUTHORIZATION_REQUIRED even though public-api-key and private-secret-key are correct.
Root cause
Yuno requires three headers for authenticated requests: public-api-key, private-secret-key, and account-code. The account-code identifies which merchant account to operate against and is mandatory. Omitting it, or passing an account-code value that does not match the credentials’ associated account, causes a 403.
Fix
Add account-code to every API request header. The value is found in Dashboard > Settings > API Keys alongside the other credentials.
3. 400 CHECKOUT_SESSION_NOT_FOUND — Session expired
Symptom The SDK initialization call or a payment attempt returns400 CHECKOUT_SESSION_NOT_FOUND, often after the user has been idle on the checkout page.
Root cause
Checkout sessions have a 60-minute TTL from the time of creation. Once expired, the session token is permanently invalid and cannot be reused or refreshed. This most commonly occurs in testing (leaving a tab open overnight) or in production flows where users return to a page after an extended absence.
Fix
- Detect the
CHECKOUT_SESSION_NOT_FOUNDerror in your error handler. - Call your backend to create a new checkout session via
POST /v1/checkout-sessions. - Re-initialize the Yuno SDK with the new session token.
4. Payment stuck on CREATED — continuePayment() not called after 3DS
Symptom A payment is created successfully and returns aCREATED status, but the payment never progresses to PENDING or SUCCEEDED. The Yuno Dashboard shows the payment as CREATED indefinitely.
Root cause
For payment flows that require 3D Secure authentication, the SDK presents the 3DS challenge inside an iframe or redirect. After the user completes authentication, you must call yuno.continuePayment() to submit the authentication result to Yuno. If this call is omitted, the payment sits in CREATED with no further action taken — Yuno cannot advance the payment without confirmation that authentication completed.
Fix
Implement the onPaymentMethodSelected and yunoCreatePayment callbacks, and call continuePayment() once your backend has created the payment.
5. SDK not loading — public-api-key not passed to Yuno.initialize()
SymptomYuno.initialize() throws an error or the SDK renders a blank checkout. The browser console may show TypeError: Cannot read properties of undefined or a 401 error on SDK asset requests.
Root cause
Yuno.initialize() requires the public-api-key as its first argument. This key is used to authenticate SDK asset loading and to scope the checkout session to your merchant account. Passing undefined, an empty string, or the private-secret-key by mistake causes the SDK to fail at initialization before any UI is rendered.
Fix
Pass the public-api-key explicitly and verify it is defined before calling initialize.
6. CORS error in browser — calling private endpoints from the browser
Symptom The browser console shows a CORS error such asAccess to fetch at 'https://api-sandbox.y.uno/v1/payments' from origin 'http://localhost:3000' has been blocked by CORS policy.
Root cause
Yuno’s private API endpoints (payment creation, capture, refund, etc.) are intended for server-to-server communication and do not return CORS headers that permit browser-origin requests. Calling these endpoints directly from frontend JavaScript exposes your private-secret-key in the browser and will fail with a CORS error in any case.
Fix
Move all calls that use private-secret-key to your backend. Your frontend should only call your own API, which then calls Yuno server-side.
7. 400 INVALID_PARAMETERS on customer.document — PIX requires CPF/CNPJ
Symptom A PIX payment returns400 INVALID_PARAMETERS with a message referencing customer.document.document_number or customer.document.document_type.
Root cause
PIX is a Brazilian payment method regulated by the Banco Central do Brasil. All PIX transactions require the payer’s Brazilian tax identification: CPF (11 digits, for individuals) or CNPJ (14 digits, for businesses). These fields are mandatory — the payment cannot be created without them. Passing a formatted document number (with ., -, or / characters) also triggers this error; only raw digits are accepted.
Fix
Include the customer.document object with unformatted digits only.
document_type must be "CPF" (11 digits) for individuals or "CNPJ" (14 digits) for businesses. Do not include formatting characters — pass digits only.8. IDEMPOTENCY_DUPLICATED — X-Idempotency-Key already used
Symptom A payment creation request returns400 IDEMPOTENCY_DUPLICATED.
Root cause
Yuno’s idempotency system stores the association between an X-Idempotency-Key value and the original request payload. If you send a new request with the same key but a different payload, Yuno rejects it to prevent accidental double payments. This commonly happens when a key is incorrectly derived from non-unique data (e.g., a user ID or product ID rather than a unique transaction ID) or when a key is reused across retry attempts that changed the request body.
Fix
Generate a new UUID v4 for each distinct payment intent. Only reuse the same key if you are retrying the exact same request (same payload) after a network failure.