Pay sellers in local currency, on the cheapest rail.
A marketplace pays sellers, contractors, and suppliers across Brazil, Mexico, Argentina, and Colombia. CodeSpar routes each transfer to the cheapest, fastest rail per destination — Pix, SPEI, or USDC settled to local currency via UnblockPay — and signs a revocable mandate on every cent that moves.
It prices every rail, then pays on the winner.
For one $2,000 payout to a seller in Argentina, the route optimizer scores each eligible rail by FX cost plus settlement latency. A USD wire bleeds correspondent-bank spread; USDC sent over Circle and off-ramped to ARS through UnblockPay clears cheapest and fastest — so that's the rail it signs the mandate on.
- Live FX + fee scoring per rail — no hard-coded provider per country
- USDC settles to the seller's local currency via UnblockPay offramp
- The chosen route and its rationale are sealed onto the transfer mandate
Pay seller Diego in Argentina $2,000 on the cheapest rail.
On it — scoring every eligible rail for Diego's payout by FX cost + settlement time before I sign the mandate.
The conversation is the easy part.
Cross-border payout is a per-country plumbing problem. Each market has its own rail, its own FX spread, its own settlement window. Teams hard-code one provider, eat the spread, and have no audit trail when finance asks why a transfer cost what it did.
Wire everything in USD and let correspondent banks skim the FX
Route in local currency on the cheapest rail per destination
Hard-code one PSP per country and re-integrate when fees move
codespar_pay picks Pix / SPEI / USDC by live cost at run time
No record of why a transfer chose the rail it did
Every payout mandate-signed and sealed with the route rationale
Reconcile settlements across four providers by spreadsheet
Settlement correlation closes each transfer back to its mandate
One payout verb. Every local rail.
Your agent calls codespar_pay with an amount and a destination; the route optimizer compares Pix (Asaas / Stark Bank), SPEI, and USDC (Circle) by live cost and settlement speed, then executes on the winner. When stablecoin clears cheapest, codespar_crypto_pay sends USDC and off-ramps it to the recipient's local currency through UnblockPay by counterparty country. Every transfer carries a signed, revocable mandate and lands in the audit ledger with the route it took and why.
320 payouts · BR/MX/AR/CO
codespar_payCheapest rail per country
Route optimizercodespar_payInstant · R$ spread 0
Stark Bankcodespar_crypto_payOfframp to local currency
Circle + UnblockPayMandate + route sealed
Each payout enters the route optimizer, which scores every eligible rail by FX cost plus settlement latency. The winning rail's provider executes under a per-transfer mandate signed by the tenant's wallet policy; the proxy runs it; settlement correlation matches the confirmation back to the mandate and seals the receipt with the route rationale attached.
A few lines. The whole loop.
const session = await codespar.sessions.create(); const results = await session.execute("codespar_pay", { batch: sellers.map((s) => ({ amount: s.amountUSD, currency: "local", // settle in the seller's currency destination: s.payoutAccount, // BR / MX / AR / CO optimize: "cheapest", // Pix · SPEI · USDC by live cost })), }); // each transfer: mandate-signed, executed on the winning rail, // settlement-correlated, and sealed with the route it chose + why
codespar_payOutbound payout — route optimizer picks Pix, SPEI, or USDC by live cost.
codespar_crypto_paySends USDC via Circle and off-ramps to local currency through UnblockPay by destination country.
Mandate engineEvery transfer signed with a revocable mandate scoped to the tenant's wallet policy.
Ship it this afternoon.
Open the sandbox, point a session at your providers, and run the whole loop against real rails in minutes — not the quarter it takes to build it by hand.