payment_method on one account, which connection to use — and lets you branch by buyer attributes (country, currency, amount, card brand, custom metadata, …).
Resource shape
| Field | Type | Notes |
|---|---|---|
id | UUID | Server-assigned. The same value is referenced as routing_id in URL paths. |
account_code | string | Inferred from your API key. Not supplied in request bodies. |
payment_method | enum | E.g., CARD, PIX, WALLET. Immutable per routing — to route a different method, create a new routing. |
name | string | Free-form label. |
default_route | object | The route used when no condition_sets[] matches. Required. |
condition_sets[] | object[] | Optional. Ordered by sort_number — first matching set wins. Each has one route. |
created_at, updated_at | ISO-8601 timestamps | Server-managed. |
route.steps[]
Each step is one provider attempt. index values are contiguous starting at 1.
| Field | Type | Required | Notes |
|---|---|---|---|
index | int | yes | Step ordinal within the route. Cycles are forbidden — output[].next must point to a higher index. |
provider_id | string | yes | Must match the provider_id of the referenced connection. |
connection_id | UUID | yes | Must be ACTIVE, in the same account, and support the routing’s payment_method. |
output[] | object[] | no | Per-outcome handlers. Omit for terminal steps with no chaining or per-decline customization — the route will just run the step and terminate with whatever the provider returned. |
output[] entries
| Field | Type | Required | Notes |
|---|---|---|---|
status | enum | yes | What outcome this entry reacts to. See enum below. |
decline_types[] | string[] | only with status = DECLINE_GROUP | Subset of Yuno’s normalized decline taxonomy. |
error_rate_threshold | object | only with status = ERROR_RATE | { threshold_percent: int, window_seconds: int }. |
next | int | null | yes | Index of the step to jump to, or null to terminate. |
status enum
| Value | Triggers when | Companion field |
|---|---|---|
APPROVED | The provider returned success. Implicit by default; list explicitly only for post-approval routing. | — |
DECLINED | Any decline (catch-all). Place last in the array. | — |
DECLINE_GROUP | Decline whose normalized code is in decline_types[]. | decline_types[] |
ERROR_RATE | The step’s rolling error rate exceeds error_rate_threshold. | error_rate_threshold |
TIMEOUT | The provider didn’t respond within Yuno’s per-step timeout. | — |
INTERNAL_ERROR | The provider returned a 5xx or connection error before reaching the issuer. | — |
- The route enters at
index: 1. - The provider call runs.
- Yuno walks
output[]top-to-bottom; the first entry whosestatus(plus optionaldecline_types/error_rate_thresholdpredicate) matches the outcome wins. - If the matched entry’s
nextis an integer, jump to that step. Ifnullor no entry matches, the route terminates with the actual provider outcome.