How to pay invoices, boletos, and Pix codes with stablecoins through an API

Register the bill, quote it, pay it from USDC or USDT, and track two webhook streams. A developer guide to stablecoin bill pay, boleto gotchas included.

To pay a bill from stablecoins through an API, register the bill (an invoice with the vendor's bank details, a boleto barcode, or a Pix code), request a quote for it, then execute a payout from USDC or USDT. The provider converts the stablecoins and pays the bill over the vendor's normal rail. Track the bill and the payment as two separate objects, and retry by re-quoting, never by registering twice.

This guide is for engineering and product teams adding bill pay or accounts payable to a stablecoin product. It covers the general pattern first, then the exact flow, with BlindPay's Payables API as the worked example.

Why pay bills from stablecoins instead of sending a payout?

A regular stablecoin payout answers "send this much to this account." A bill is different. Its amount, beneficiary, and due date are set by someone else, and for some bill types they change over time. Treating a bill as a plain payout means your code has to parse the bill, compute what's owed, and hope it didn't move.

A bill-pay API flips that. You register the bill, the provider resolves what it can from the payment rail, and the amount comes from the bill, not from you. That matters for three groups:

  • Businesses that hold stablecoin balances and want to pay suppliers, rent, or taxes without converting manually first.
  • Fintechs and wallets that want to offer "pay a bill" to customers who keep dollars on-chain.
  • Cross-border teams paying Brazilian boletos or US vendor invoices from a dollar stablecoin treasury.

There's also a reconciliation reason. The U.S. Faster Payments Council's July 2026 report points out that stablecoins don't carry trade information on their own, so an overlay is needed to link a payment to its invoice. A payable is that overlay: one object that ties the bill, the line items, and the payment together.

Which bills can you pay with stablecoins?

Bill typeWhat you sendCurrencyPaid overWhere the amount comes from
US vendor invoiceVendor's bank details, line items, taxes, discountUSDACH or wireYour line items, plus taxes, minus discount
BoletoThe 47-digit linha digitável or 44-digit barcodeBRLBoleto clearingResolved from the rail at registration, and again at quote time
Utility or tax bill (arrecadação)The 48-digit code or 44-digit barcode starting with 8BRLBill clearingEncoded in the barcode, no interest
Pix code with a fixed amountThe Pix copy-and-paste payloadBRLPixEmbedded in the code
Pix code without an amountThe Pix payload plus line itemsBRLPixYour line items

Pix is the Banco Central do Brasil's instant payment system and runs 24/7. Boletos are Brazil's bank payment slips, used for everything from supplier invoices to school fees, and they clear only on banking days. US invoices travel over ACH, governed by Nacha, or by wire.

How do you pay a bill from stablecoins, step by step?

  1. Verify the customer. The business that owes the bill goes through KYB, or the individual through KYC. Nothing is registered until it's approved.
  2. Register the bill. One call, whatever the type. You get back a payable ID and the resolved details: beneficiary, current amount, due date.
  3. Quote the payable. Ask for a quote with the payable ID, the network, and the token. Don't send an amount. The quote prices the stablecoin side so the bill is paid in full, with the sender covering fees.
  4. Authorize and execute. From an external EVM wallet, approve the ERC-20 pull for the quoted amount, then execute the payout. From a managed wallet, skip the approval.
  5. Track two webhook streams. Payable events describe the bill. Payout events describe the payment attempt, including compliance holds and failure reasons.
  6. Reconcile and retry. Mark the invoice paid on the payable's completion event. If an attempt fails or is refunded, the bill returns to draft: quote it again.

Here's an illustrative version of steps 2 and 3 on BlindPay's API, registering a boleto and quoting it:

Bash

The full request and response shapes, including invoice registration with line items, are in the Payables docs.

What makes boletos different?

Boletos are the bill type that breaks naive integrations. Four rules to build around:

  • The amount moves. A boleto's amount is resolved again at quote time. Fines, interest, or a discount for paying early can change it. Quote an overdue boleto on two different days and you can get two amounts. Never pay from a cached figure.
  • The quote can update the bill. Quoting re-resolves the due date and, if it was empty, the beneficiary. A read right after quoting can show different details than registration did.
  • Boletos clear in a window. Brazilian banking days only, 06:30 to 18:30 BRT, or 14:30 BRT for bills above R$250,000. A boleto quoted outside that window is paid the next banking day.
  • Late bills get rejected. If the next available payment day falls after the due date, the quote fails with payable_boleto_would_be_overdue instead of paying late.

Pix codes and US invoices don't have these problems. Their amount is fixed at registration, and Pix runs at any hour.

How do statuses and webhooks work for a paid bill?

A payable has four statuses, and they describe the bill, not the attempt:

StatusMeaning
draftRegistered and quotable. A failed or refunded attempt returns the bill here
processingA payout is executing it, including during a compliance hold
completedPaid. Terminal
canceledA draft that was deleted. The code can be registered again

The payment attempt lives on the payout, with its own payout.new, payout.update, and payout.complete events. The bill emits payable.new, payable.update, and payable.complete. One paid bill produces both a payable.complete and a payout.complete. Correlate them through payable_id and payout_id, and count the payment once. Stablecoin API webhooks and reconciliation covers signature checks and deduplication.

What are the common mistakes?

  • Registering the same code twice. The second call fails with duplicate_payable. To retry, quote the existing payable.
  • Sending an amount with the quote. A payable quote takes its amount from the bill. Don't send request_amount.
  • Letting the quote expire. Quotes last 5 minutes. Execute promptly, or request a new quote for the same payable.
  • Paying from an unsupported network. Payables are EVM-only today. A Stellar or Solana quote is refused with payable_network_not_supported.
  • Forgetting the minimum. A bill must be worth at least 10.00 USD on the paying side, and a bill near that floor can fail later if the rate moves.
  • Double counting. Booking both the payable and the payout completion as payments.

How does BlindPay handle bill pay?

BlindPay launched Payables in August 2026. It pays invoices to US bank accounts over ACH or wire, boletos, utility and tax bills, and Pix codes, from USDC or USDT on EVM networks, using the same quote-and-payout flow as any other BlindPay payout. Invoice payables can attach the original PDF, and the dashboard can prefill an invoice by reading it with AI. Every bill passes the same KYC, KYB, and sanctions checks as the rest of the API.

To build accounts payable on top of it, the invoice payables prompt gives a coding agent the full integration spec. The cut-off times reference lists the boleto windows.

What to do next

Pick the bill type your users pay most often and run it end to end on a development instance: register it, quote it, pay it, and watch both webhook streams. Then try a failed attempt and confirm your code re-quotes instead of re-registering. For the full context on how stablecoin payments move, see what blockchain payments are, and for when a bill is better paid over a plain domestic rail, when not to use blockchain payments.

FAQ