Error response format
All Yuno API errors return a JSON body with two fields:code— a machine-readable string identifying the error class. Log this value when opening support tickets.messages— a human-readable array describing what went wrong. There may be multiple messages when several fields fail validation simultaneously.
HTTP status codes
| Status | Meaning in Yuno | Retryable? |
|---|---|---|
200 / 201 | Request succeeded | — |
400 Bad Request | Invalid request schema, missing required fields, or malformed values | No — fix the request |
401 Unauthorized | Missing or invalid authentication credentials | No — fix credentials |
403 Forbidden | Authenticated but not permitted (e.g., payment method not enabled for merchant) | No — contact Yuno |
404 Not Found | Resource does not exist or endpoint path is incorrect | No — fix the request |
409 Conflict | Concurrent request with the same idempotency key | No — wait and check status |
429 Too Many Requests | Rate limit exceeded | Yes — with backoff |
500 Internal Server Error | Unexpected server-side error | Yes — with backoff |
504 Gateway Timeout | Upstream timeout; request may or may not have been processed | Yes — use idempotency key |
Retryable vs. non-retryable errors
Non-retryable errors (4xx)
4xx errors indicate a problem with your request or account configuration. Retrying without changing anything will produce the same error.
- 400 — Inspect
messagesfor the exact field or value that failed validation. Fix the request payload before retrying. - 401 — Verify that
public-api-key,private-secret-key, andaccount-codeheaders are present and correct for the target environment (sandbox vs. production). - 403 — The merchant account lacks permission for the requested operation. Check Dashboard → Connections to confirm the payment method is enabled, or contact Yuno support.
Retryable errors (429 and 5xx)
These errors indicate transient conditions. Retry with exponential backoff:- 429 — Back off and retry. The response may include a
Retry-Afterheader indicating how long to wait. - 500 / 504 — The server encountered an error or timed out. Because the idempotency key is not stored on
5xxresponses, it is safe to retry with the same key. Wait at least 1 second before the first retry, then double the interval on each subsequent attempt (e.g., 1s → 2s → 4s → 8s), up to a maximum of around 30 seconds.
Error handling pattern
Payment status vs. API errors
A
200 API response does not mean the payment succeeded. It means the API request was valid and accepted. The payment itself may still be DECLINED or PENDING.Always check the payment_status field in the response body to determine the actual outcome of the transaction, and configure webhooks to receive asynchronous status updates.200 response body may contain:
provider_code and provider_message contain the downstream reason. These are distinct from the top-level API error code and messages fields.