Skip to main content
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

Top-level fields
route object
route.steps[] Each step is one provider attempt. index values are contiguous starting at 1.
output[] entries
status enum
Evaluation rules
  1. The route enters at index: 1, unless start_split is set — then Yuno draws one entry step per payment according to the percentages.
  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 has next, jump to that step. If it has next_split, Yuno draws one of its steps per payment according to the percentages and jumps there. If neither is set or no entry matches, the route terminates with the actual provider outcome.

Percentage splits

Both start_split and output[].next_split are lists of { "index", "percentage" } entries:
How a split is resolved: the split is evaluated once per payment, before the step runs. For a next_split of [{ "index": 2, "percentage": 70 }, { "index": 3, "percentage": 30 }], roughly 70% of the payments that hit that output continue on step 2 and 30% on step 3; each individual payment follows exactly one branch. Over many payments the traffic converges to the configured percentages. Rules:
  • start_split needs at least one entry. A single entry with percentage: 100 is the explicit way to send all traffic to one step; omitting start_split means 100% on index: 1.
  • next_split needs at least two entries. For a single destination use next. next is optional next to next_split; if you send both, next must be the first entry of next_split. Responses always include next = first entry alongside next_split, so clients that only read next keep a fallback.
  • Every step must be reachable from the entry, through start_split, next or next_split.
  • A percentage of 0 is allowed, so you can keep a step in the configuration while it receives no traffic.
  • Percentages are integers. Decimals are rejected.
  • A split that breaks one of these rules is rejected with 400 INVALID_ROUTE_CONFIGURATION; messages names the split and the rule. A wrong shape (a decimal percentage, a missing percentage, a single-entry next_split) is rejected before that with 400 INVALID_PARAMETERS / BAD_REQUEST.
Update a Routing replaces the full configuration, splits included. A condition set sent without start_split goes back to a single entry on step 1, and an output sent without next_split keeps only the next it declares, so omitting a split is how you remove it. Retrieve a Routing always returns the current start_split and next_split, so a read-modify-write flow keeps them unless you drop them on purpose.