Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.y.uno/llms.txt

Use this file to discover all available pages before exploring further.

A routing tells Yuno, for one 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

{
  "id": "r_8f2c1d3e-…",
  "account_code": "acc-uuid",
  "payment_method": "CARD",
  "name": "Card routing",
  "default_route": {
    "steps": [
      { "index": 1, "provider_id": "STRIPE", "connection_id": "f1a3c4d5-…" }
    ]
  },
  "condition_sets": [
    {
      "sort_number": 1,
      "name": "US & Canada — high value",
      "description": "Route US/CA credit card transactions over $500",
      "conditions": [
        { "condition_type": "COUNTRY", "conditional": "ONE_OF",       "values": ["US", "CA"] },
        { "condition_type": "AMOUNT",  "conditional": "GREATER_THAN", "values": ["500"], "currency": "USD" }
      ],
      "route": {
        "steps": [
          { "index": 1, "provider_id": "STRIPE", "connection_id": "f1a3c4d5-…",
            "output": [{ "status": "DECLINED", "next": 2 }] },
          { "index": 2, "provider_id": "ADYEN",  "connection_id": "b2c4d5e6-…" }
        ]
      }
    }
  ],
  "created_at": "2026-05-12T12:00:00Z",
  "updated_at": "2026-05-12T12:00:00Z"
}
Top-level fields
FieldTypeNotes
idUUIDServer-assigned. The same value is referenced as routing_id in URL paths.
account_codestringInferred from your API key. Not supplied in request bodies.
payment_methodenumE.g., CARD, PIX, WALLET. Immutable per routing — to route a different method, create a new routing.
namestringFree-form label.
default_routeobjectThe 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_atISO-8601 timestampsServer-managed.
route.steps[] Each step is one provider attempt. index values are contiguous starting at 1.
FieldTypeRequiredNotes
indexintyesStep ordinal within the route. Cycles are forbidden — output[].next must point to a higher index.
provider_idstringyesMust match the provider_id of the referenced connection.
connection_idUUIDyesMust be ACTIVE, in the same account, and support the routing’s payment_method.
output[]object[]noPer-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
FieldTypeRequiredNotes
statusenumyesWhat outcome this entry reacts to. See enum below.
decline_types[]string[]only with status = DECLINE_GROUPSubset of Yuno’s normalized decline taxonomy.
error_rate_thresholdobjectonly with status = ERROR_RATE{ threshold_percent: int, window_seconds: int }.
nextint | nullyesIndex of the step to jump to, or null to terminate.
status enum
ValueTriggers whenCompanion field
APPROVEDThe provider returned success. Implicit by default; list explicitly only for post-approval routing.
DECLINEDAny decline (catch-all). Place last in the array.
DECLINE_GROUPDecline whose normalized code is in decline_types[].decline_types[]
ERROR_RATEThe step’s rolling error rate exceeds error_rate_threshold.error_rate_threshold
TIMEOUTThe provider didn’t respond within Yuno’s per-step timeout.
INTERNAL_ERRORThe provider returned a 5xx or connection error before reaching the issuer.
Evaluation rules
  1. The route enters at index: 1.
  2. The provider call runs.
  3. Yuno walks output[] top-to-bottom; the first entry whose status (plus optional decline_types / error_rate_threshold predicate) matches the outcome wins.
  4. If the matched entry’s next is an integer, jump to that step. If null or no entry matches, the route terminates with the actual provider outcome.