code for programmatic handling and surface the messages array to your support tools.
Error envelope
There is no
error wrapper, no singular message, no type, no details. The body is exactly the two top level fields above.
Yuno sets
x-trace-id on every response. When you open a support ticket, attach the response body and the x-trace-id header so the team can pull the trace.HTTP status to error code
The shared utility libraries map common HTTP statuses to a defaultcode. Service code may return a more specific business code for the same status (see the next table).
Resource specific business codes
Services emit their owncode values for domain rules. The most common ones you will see in production:
Customers
Recipients (marketplace)
Validation framework codes (Kotlin services)
These come from the shared exception handler in the Kotlin services and apply to checkout sessions, recipients, payouts, and any service that uses the shared library.Provider errors
Errors that originate at a downstream payment provider are surfaced under codes prefixed withPROVIDER_. Examples include PROVIDER_INVALID_CREDENTIALS, PROVIDER_INVALID_REQUEST, PROVIDER_PAYMENT_NOT_FOUND, PROVIDER_INVALID_AMOUNT, PROVIDER_COUNTRY_NOT_SUPPORTED, and PROVIDER_CURRENCY_NOT_ALLOWED. The provider’s raw response is reflected through messages. See Provider errors for the full mapping.
Validation errors in practice
Validation failures from Kotlin services package every failed field into themessages array. The shape is always { code, messages }, never a structured details object.
messages so they can act on all failures at once.
Retry strategy
For non idempotent writes, the safe pattern is to set a unique business key in the request body (
merchant_customer_id, merchant_order_id, merchant_recipient_id). Yuno’s database constraints reject duplicates, so a retry that finds the same key returns a clear 400 rather than creating a duplicate. The one endpoint that supports X-Idempotency-Key directly is POST /v1/subscriptions. See Avoiding duplicates.
Use exponential backoff with full jitter, starting at 1 s and capped at 30 s. When
Retry-After is present on a 429, honor it as the floor for the wait.
Best practices
- Branch on
code, never onmessages. The strings inmessagesare subject to copy edits and localization. Thecodeis the contract. - Set a unique business key on every non idempotent write (
merchant_customer_id,merchant_order_id,merchant_recipient_id). OnPOST /v1/subscriptionsyou can also passX-Idempotency-Key. - Log the full envelope plus the
x-trace-idresponse header for every failed request. Withoutx-trace-id, support cannot find your request in our traces. - Treat
PROVIDER_*codes as upstream signals. They indicate the failure happened at the provider, not at Yuno. Inspectmessagesfor the provider’s raw text. - Alert on
5xxrate, not on individual5xxevents. Provider blips are normal. Sustained spikes are not.
What next
Avoiding duplicates
Use unique business keys to make retries safe across customers, payments, and subscriptions.
Error codes catalog
Full reference of every error code Yuno can return.
Provider errors
PROVIDER_* codes mapped to each provider’s raw responses.