One decision per payment
Every Rey payment carries a strategy: cheapest, fastest or balanced. Leave it out and the workspace default from your console settings applies. The router takes that strategy, the amount, the source currency and the destination, and returns every rail that can carry the payment, best first. The payment flow then tries them in that order.
The router is deliberately pure: no network calls, no database reads. The same function answers POST /quotes, creates payments and runs in our unit tests, so a quote and the payment that follows it can never disagree about the ranking.
Step 1: who can carry it?
Each rail declares the corridors it serves as a destination currency plus a list of countries, or any country for networks like SWIFT. A EUR payment to Germany is eligible for SEPA Instant, card push and SWIFT. A BRL payment to Brazil is eligible for Pix. If nothing serves the corridor, the request is refused with 422 no_route before any money moves.
Rails you have switched off in the console are dropped here too, and so are rails on a live provider when the beneficiary is missing the fields that provider needs.
Step 2: price every candidate
For each candidate the router computes the partner fee as a variable rate in basis points plus a fixed fee, converted into the source currency. It adds Rey's own fee, which is set by your plan (15 bps on Growth), and works out what the beneficiary receives after conversion.
partner_fee = round(amount × fee_bps / 10_000) + fixed_fee (in source currency)
rey_fee = round(amount × plan_bps / 10_000)
fee = partner_fee + rey_fee
received = convert(amount − fee, source → destination)Step 3: score cost against speed
Cost and speed are normalised against the other candidates for the same payment, not against some global scale. The most expensive candidate scores a cost of 1 and the rest score relative to it.
Speed is the interesting one. Settlement times on Rey's rails range from about two seconds to two days, and a linear scale would make every instant rail look identical next to SWIFT. So speed is scored on a log scale: going from 2 to 10 seconds counts about as much as going from one day to five. That keeps the router discriminating among fast rails as well as slow ones.
Each strategy weighs the two differently:
| Strategy | Cost weight | Speed weight |
|---|---|---|
cheapest | 0.85 | 0.15 |
fastest | 0.15 | 0.85 |
balanced | 0.50 | 0.50 |
Finally, the score is multiplied by the rail's reliability, its expected success rate. A rail that is slightly cheaper but fails more often loses points for it, because a failed attempt costs you a failover and time.
Step 4: promises, not leanings
Here is the part that surprises people. The weighted score fully decides only balanced. For the other two strategies the router sorts strictly by the one thing you asked for:
cheapestorders by total fee. The score only breaks ties.fastestorders by settlement time, then by fee. The score is not consulted.balancedorders by the weighted, reliability-adjusted score, then by fee.
We tried weights alone first. A heavily cost-weighted score will still, now and then, rank a slightly pricier rail above the cheapest one because it is much faster. That is a reasonable judgement, but it is not what someone who typed cheapest asked for. Strategies are promises; the weights are only there to break ties and to power balanced.
An example: $500 to the US
Take a $500.00 USD payout to a US bank account on the Growth plan. Three sandbox rails serve the corridor domestically, with SWIFT as an outside option:
| Rail | Partner fee | Settles in | Reliability |
|---|---|---|---|
| ACH | $0.50 | ~1 day | 99.5% |
| RTP / FedNow | $0.95 | ~5 seconds | 99.0% |
| Card push | $4.75 | ~30 seconds | 98.0% |
| SWIFT | $18.00 | ~2 days | 97.0% |
cheapest picks ACH. fastest picks RTP / FedNow. balanced also lands on RTP / FedNow: it costs 45 cents more than ACH but arrives about a day sooner, and next to card push and SWIFT both fees are small. Rey's own $0.75 fee is the same on every rail, so it never changes the order.
Ask for a quote with POST /api/v1/quotes and you get this whole ranked list back, with fees, the received amount and settlement times, before you commit to anything.
Then: failover
The ranking is also the failover order. If the first rail answers with a retryable error, such as partner_unavailable, Rey moves to the next, up to three rails per payment. A non-retryable decline, like a closed account, stops the payment, because another rail would only be refused again. You can watch this happen in test mode with the fail_first sandbox scenario.
The figures above are Rey's sandbox rail profiles, modelled on each real rail. Live provider pricing will vary by partner agreement.



