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
route object
route.steps[]
Each step is one provider attempt. index values are contiguous starting at 1.
output[] entries
status enum
- The route enters at
index: 1, unlessstart_splitis set — then Yuno draws one entry step per payment according to the percentages. - 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 has
next, jump to that step. If it hasnext_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
Bothstart_split and output[].next_split are lists of { "index", "percentage" } entries:
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_splitneeds at least one entry. A single entry withpercentage: 100is the explicit way to send all traffic to one step; omittingstart_splitmeans 100% onindex: 1.next_splitneeds at least two entries. For a single destination usenext.nextis optional next tonext_split; if you send both,nextmust be the first entry ofnext_split. Responses always includenext= first entry alongsidenext_split, so clients that only readnextkeep a fallback.- Every step must be reachable from the entry, through
start_split,nextornext_split. - A
percentageof0is 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;messagesnames the split and the rule. A wrong shape (a decimal percentage, a missingpercentage, a single-entrynext_split) is rejected before that with400 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.