localsDocs Get sandbox keys
Guides/Pay out with a quote

Pay out with a quote

Quote, accept, fund the exact amount before the quote expires, and follow the transfer until the money lands in the bank account.

This guide sends 3,200 USDC from Polygon to a bank account in the Philippines. The receiver, Maria Santos, gets ₱182,400.00 at a rate of 57.00.

  1. Get a quote. What you send, what arrives, the rate and the fees.
  2. Accept it. Create a transfer with the receiving bank account.
  3. Fund it. Send the exact amount to the single-use address before the quote expires.
  4. Follow it. Read the transfer until it is complete.
Note

Early access. Payouts are enabled per partner on request; the currencies are listed in Coverage and limits.

Before you start

1. Get a quote

Ask for a price before you commit. Quote the chain you will send from: the funding instructions use the same chain.

curl -X POST https://api.locals.money/v1/quotes \
  -H "Authorization: Bearer $LOCALS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": { "currency": "USDC", "chain": "polygon", "amount": "3200.00" },
    "destination": { "currency": "PHP", "country": "PH", "rail": "bank" }
  }'
const res = await fetch('https://api.locals.money/v1/quotes', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LOCALS_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    source: { currency: 'USDC', chain: 'polygon', amount: '3200.00' },
    destination: { currency: 'PHP', country: 'PH', rail: 'bank' },
  }),
});
const quote = await res.json();
import os
import requests

res = requests.post(
    "https://api.locals.money/v1/quotes",
    headers={"Authorization": f"Bearer {os.environ['LOCALS_KEY']}"},
    json={
        "source": {"currency": "USDC", "chain": "polygon", "amount": "3200.00"},
        "destination": {"currency": "PHP", "country": "PH", "rail": "bank"},
    },
)
quote = res.json()
Response · 201
{
  "id": "quo_7d2e",
  "source": { "amount": "3200.00", "currency": "USDC", "chain": "polygon" },
  "destination": { "amount": "182400.00", "currency": "PHP", "rail": "bank" },
  "rate": 57.0,
  "fees": { "total": { "amount": "0.00", "currency": "USDC" } },
  "localsFee": { "percent": "0.3", "amount": "9.60", "currency": "USDC" },
  "tenantFee": null,
  "expiresAt": "2026-10-21T09:27:44Z"
}

Show the quote to whoever approves the payout, then accept it. Quotes are short-lived: if expiresAt passes, request a new one.

2. Accept the quote

Create a transfer from the quote with the bank account that receives the money and a purpose code.

curl -X POST https://api.locals.money/v1/transfers \
  -H "Authorization: Bearer $LOCALS_KEY" \
  -H "Idempotency-Key: 5d0c6a2e-8f1b-4c3a-9e7d-2b6f1a4c8e90" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "cus_8Hq2Lm",
    "quoteId": "quo_7d2e",
    "purposeCode": "TRANSFER_TO_OWN_ACCOUNT",
    "payoutAccount": {
      "accountHolderName": "Maria Santos",
      "accountNumber": "000123456789",
      "bankName": "Sample Bank PH",
      "bankCountry": "PH",
      "currency": "PHP"
    }
  }'
// One key per payout in your system, stored before the first attempt
const idempotencyKey = payout.idempotencyKey;

const res = await fetch('https://api.locals.money/v1/transfers', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LOCALS_KEY}`,
    'Idempotency-Key': idempotencyKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    customerId: 'cus_8Hq2Lm',
    quoteId: 'quo_7d2e',
    purposeCode: 'TRANSFER_TO_OWN_ACCOUNT',
    payoutAccount: {
      accountHolderName: 'Maria Santos',
      accountNumber: '000123456789',
      bankName: 'Sample Bank PH',
      bankCountry: 'PH',
      currency: 'PHP',
    },
  }),
});
const transfer = await res.json();
# One key per payout in your system, stored before the first attempt
idempotency_key = payout["idempotency_key"]

res = requests.post(
    "https://api.locals.money/v1/transfers",
    headers={
        "Authorization": f"Bearer {os.environ['LOCALS_KEY']}",
        "Idempotency-Key": idempotency_key,
    },
    json={
        "customerId": "cus_8Hq2Lm",
        "quoteId": "quo_7d2e",
        "purposeCode": "TRANSFER_TO_OWN_ACCOUNT",
        "payoutAccount": {
            "accountHolderName": "Maria Santos",
            "accountNumber": "000123456789",
            "bankName": "Sample Bank PH",
            "bankCountry": "PH",
            "currency": "PHP",
        },
    },
)
transfer = res.json()
Response · 201
{
  "id": "trf_4b7q",
  "kind": "quoted",
  "customerId": "cus_8Hq2Lm",
  "routeId": null,
  "status": "pending",
  "source": { "amount": "3200.00", "currency": "USDC", "rail": "polygon" },
  "destination": { "amount": "182400.00", "currency": "PHP", "rail": "bank" },
  "quote": { "id": "quo_7d2e", "rate": 57.0, "expiresAt": "2026-10-21T09:27:44Z" },
  "depositInstructions": { "address": "0x91c2000000000000000000000000000000007a3f", "amount": "3200.00", "currency": "USDC", "chain": "polygon" },
  "payoutAccount": { "bankName": "Sample Bank PH", "accountHolderName": "Maria Santos", "last4": "6789", "country": "PH", "currency": "PHP" },
  "statusHistory": [ { "status": "pending", "at": "2026-10-21T09:13:02Z" } ]
}

Store id and depositInstructions with your payout. The response never returns the full account number, only last4.

Note

Retrying is safe. A quote becomes only one transfer: if a request times out, send it again with the same body and you get back the transfer already created, with 200, not a second one. The same quote with any other customer, purpose code or account detail is 409 quote_already_used, even if the first request got no answer. Send the same Idempotency-Key, generated once per payout, on every retry, and never fund more than one transfer for the same payout.

The customer's limits are checked here, before the banking partner is called: over one, 422 limit_exceeded with the limit and what is left. A blocked customer gets 403 customer_blocked.

Payout account requirements

Some currencies need more than the base fields:

Destination currencyAlso send
AED, CAD, EUR, GBP, MXN, USDrecipientType, and dateOfBirth (YYYY-MM-DD) when the recipient is an individual. Without them, 400
Any, with rail: swiftOnly for business customers; send swiftCode

Send accountNumber or iban, one of the two, and currency equal to the quote's destination.currency. Optional: address, and the bank codes swiftCode, bicCode, bsbCode, abaCode and sortCode. purposeCode is one of the purpose codes. See Transfers and payouts for every field.

3. Fund the transfer

The payout starts when the funds arrive. Send from your wallet:

Value
Amountexactly depositInstructions.amount: 3200.00
CurrencydepositInstructions.currency: USDC
ChaindepositInstructions.chain: polygon
TodepositInstructions.address: 0x91c2000000000000000000000000000000007a3f
Beforequote.expiresAt: 2026-10-21T09:27:44Z
Warning

Leave time to fund. An expired quote is refused at POST/v1/transfers with 422 quote_expired, but a transfer accepted just before expiresAt still has to be funded and confirmed on chain in time.

4. Follow the transfer

Each status change sends a transfer.* event; you can also read the transfer until it reaches a final status.

pending→processing→completefailed
StatusWhat it means for a payoutWhat you do
pendingCreated; waiting for your funds.Fund it before expiresAt.
processingFunds received; the bank payment is on its way.Wait.
reviewHeld for a compliance check. It can happen at any point and the transfer continues after it.Wait. Do not fund it again. If it has actionRequired, show the link to the user.
completeThe money was paid to the bank account.Mark the payout as paid.
failedFailed, cancelled or expired. Final.See When a payout fails.
curl https://api.locals.money/v1/transfers/trf_4b7q \
  -H "Authorization: Bearer $LOCALS_KEY"
const FINAL = ['complete', 'failed', 'refunded'];
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

let transfer;
do {
  await sleep(30000);
  const res = await fetch('https://api.locals.money/v1/transfers/trf_4b7q', {
    headers: { Authorization: `Bearer ${process.env.LOCALS_KEY}` },
  });
  transfer = await res.json();
} while (!FINAL.includes(transfer.status));
import time

FINAL = ("complete", "failed", "refunded")

while True:
    time.sleep(30)
    res = requests.get(
        "https://api.locals.money/v1/transfers/trf_4b7q",
        headers={"Authorization": f"Bearer {os.environ['LOCALS_KEY']}"},
    )
    transfer = res.json()
    if transfer["status"] in FINAL:
        break

Poll every 15 to 30 seconds while the transfer is pending and you have just funded it, then every few minutes while it is processing or review. To follow many payouts at once, list them instead of reading one by one:

Payouts still in flight
curl "https://api.locals.money/v1/transfers?kind=quoted&status=pending,processing,review" \
  -H "Authorization: Bearer $LOCALS_KEY"

statusHistory lists every status the transfer went through with its time. Statuses only move forward, except a review hold, which can come and go while the transfer is processed. See Statuses and lifecycle.

Handling review and failures

When a payout is in review

A review hold is a compliance check. There is no endpoint to call: wait for the next transfer.* event, or keep reading the transfer. It continues to processing, complete or failed when the check ends. Do not create a new transfer for the same payout while one is in review.

When the user must verify their wallet

A payout to a self-custody wallet can be held until the end user proves they control it. The transfer then carries actionRequired with type: "wallet_verification", a url and an expiresAt, and Locals sends transfer.action_required. Show the link to the user: they sign with that wallet on that page, before expiresAt, and until they do the payout stays on hold. See Wallet verification.

When a payout fails

failed is final. It covers a payout that failed, was cancelled, or expired because the funds did not arrive in time, and refundReason says which: expired (the funds did not arrive before quote.expiresAt), cancelled (cancelled before it was paid) or failed (the payment failed; there is no further detail).

refunding and refunded are part of the shared transfer model. Payouts do not use them today, but handle them as statuses that need a person to look at the transfer.

Next steps