Overview
All endpoints live under https://reypayments.com/api/v1, take and return JSON, and are authenticated with a secret API key. Rey is in test mode: payouts run on sandbox rails that mirror each real rail's fees, speed and reliability, and no real money moves.
Every response uses one envelope. Success is HTTP 200 with the result under data; failure is a 4xx/5xx with an error object holding a stable code and a human-readable message. Validation failures add issues.
{ "data": { … } }
{ "error": { "code": "invalid_input", "message": "Invalid request payload.",
"issues": [{ "path": "destination_country", "message": "…" }] } }Authentication
Create a key in the console under Developers and send it as a bearer token on every request. Keys look like rey_sk_test_ followed by 32 letters and digits. The full key is shown once when you create it — Rey stores only its hash — so copy it somewhere safe.
curl https://reypayments.com/api/v1/balance \
-H "Authorization: Bearer rey_sk_test_…"A missing or malformed header returns 401 unauthenticated; a revoked or unknown key returns 401 invalid_api_key. Keep keys server-side — never ship them to a browser or a mobile app.
Conventions
- Amounts
- Integers in the currency's minor units:
100000USD is $1,000.00. USDY and USDC have 6 decimals, every other currency 2.amountis at most100000000000. - Currencies
USD,USDY,USDC,EUR,GBP,BRL,MXN,INR,ARS. Case-insensitive on input; any other code is400 invalid_input.- Source currency
- Quotes and payments are funded from your settlement balance (USD by default), so
currencymust match it; anything else returns422 unsupported_source_currency. - Countries
- ISO 3166-1 alpha-2, e.g.
BR,DE. Exactly two letters, case-insensitive. - Timestamps
- Unix seconds:
created,settled_at,checked_at. - IDs
- Prefixed by type —
pay_…payments,idn_…identities,whe_…webhook endpoints,evt_…events — followed by 20 letters and digits. - Fees
- Every route's
feeis the rail'spartner_feeplus Rey'srey_fee— your plan's rate: 20 basis points on Launch, 15 on Growth, 10 on Scale (the examples below use 15) — both in source minor units and deducted before conversion.
Idempotency
Send an Idempotency-Key header (a UUID works well; Rey uses the first 255 characters) with POST /payments to make retries safe. A repeat request with the same key returns the original payment instead of paying twice, even when two requests race.
Reusing a key with a different amount, currency, destination_currency or destination_country returns 409 idempotency_conflict. Keys are scoped to your workspace and kept indefinitely. Other endpoints ignore the header — every POST /identities opens (and is charged for) a new identity.
Quotes
POST /api/v1/quotes
Rank every enabled rail that can carry a payment, without moving money. Routes come back best first for the chosen strategy.
- amount
- Required. Positive integer, minor units of
currency, at most100000000000. - currency
- Required. Source currency — your settlement currency.
- destination_currency
- Required. What the beneficiary receives.
- destination_country
- Required. Two-letter country code.
- strategy
- Optional.
cheapestorders strictly by fee,fasteststrictly by settlement time,balancedby a weighted score. Defaults to your organisation's setting (balancedunless changed).
curl -X POST https://reypayments.com/api/v1/quotes \
-H "Authorization: Bearer rey_sk_test_…" \
-H "Content-Type: application/json" \
-d '{"amount":100000,"currency":"USD","destination_currency":"USD","destination_country":"US"}'{
"object": "quote",
"strategy": "balanced",
"fx": { "rate": 1, "source": "peg", "as_of": null },
"routes": [
{ "partner": "rtp", "partner_name": "RTP / FedNow", "fee": 295,
"partner_fee": 145, "rey_fee": 150, "destination_amount": 99705,
"settlement_seconds": 5, "score": 882 },
{ "partner": "card-push", "partner_name": "Card push", "fee": 1075,
"partner_fee": 925, "rey_fee": 150, "destination_amount": 98925,
"settlement_seconds": 30, "score": 625 },
{ "partner": "ach", "partner_name": "ACH", "fee": 225,
"partner_fee": 75, "rey_fee": 150, "destination_amount": 99775,
"settlement_seconds": 86400, "score": 508 },
{ "partner": "swift", "partner_name": "SWIFT", "fee": 2250,
"partner_fee": 2100, "rey_fee": 150, "destination_amount": 97750,
"settlement_seconds": 172800, "score": 0 }
]
}score runs 0–1000 (higher is better). fee, partner_fee and rey_fee are in minor units of currency; destination_amount is in minor units of the destination currency, after fees. fx is the mid-market rate the quote converted at (units of destination_currency per unit of currency): source is ecb for the European Central Bank's daily reference rates (refreshed every 6 hours; as_of is the rate's own date, Unix seconds), peg for USD and USD stablecoins, or static for a currency the ECB doesn't publish (ARS) — an indication, not a locked rate. An empty routes list means no enabled rail serves the corridor — a quote never returns no_route. Quotes rank every enabled rail regardless of beneficiary details; POST /payments then skips live-provider rails the beneficiary can't be paid over.
Payments
Creating a payment quotes the rails, then tries them in ranked order — up to three — failing over when a rail returns a retryable error. On a sandbox rail the call returns once the payout has succeeded or every attempt has failed. A live provider accepts a payout first: the payment comes back processing, the funds stay held, and payment.succeeded or payment.failed follows when the rail confirms. A settled bank payout can later be returned (an ACH return): the payout amount — the amount less fee; fees are not refunded — goes back to your balance and payment.returned fires. There is no failover once a provider has accepted a payout.
POST /api/v1/payments
Takes every quote field, plus:
- beneficiary
- Required object of strings.
name(1–200 characters) is required; add the fields of the rails you want it paid over (table below), up to 200 characters each. Sandbox rails need nothing more; an optionalaccount(up to 100 characters) picks a test scenario. A rail on a live provider is skipped when its fields are missing; if no rail can carry it, the request is refused with422 beneficiary_incompleteand no payment is created. - description
- Optional, up to 500 characters.
- metadata
- Optional string-to-string map — keys up to 40, values up to 500 characters.
- identity
- Optional Rey ID (
idn_…). It must belong to you (404 identity_not_found) and beapproved(422 identity_not_verified), or the payment is refused.
| Rail | Fields | Provider |
|---|---|---|
| ACH · RTP | routing_number, account_number | Increase, Stripe |
| SEPA Instant | iban | Airwallex |
| Faster Payments | sort_code, account_number | Airwallex, Stripe |
| SWIFT | bic and iban or account_number; Airwallex also address_line1, city, postal_code | Airwallex, Stripe |
| Pix | pix_key, tax_id (CPF / CNPJ); optional pix_key_type (email, phone, cpf, cnpj, random) | dLocal |
| SPEI | clabe | Airwallex, dLocal |
| UPI / IMPS | IMPS: account_number, ifsc (Airwallex) · UPI: vpa, email, phone, address (dLocal) | Airwallex, dLocal |
| Transferencias 3.0 | cbu (CBU or CVU), tax_id (CUIT / CUIL) | Airwallex, dLocal |
| Card push | stripe_recipient, stripe_payout_method (the recipient adds the card through Stripe); US and UK debit cards only | Stripe |
| USDC | address, chain — Circle: ETH, BASE, SOL, MATIC, ARB, AVAX, OP, UNI; Stripe: the same except UNI, plus XLM (Stellar) and TEMPO | Circle, Stripe |
Every rail also needs name. Where two providers carry a rail, the first one configured is used, in the order listed; a rail no provider is configured for runs on the sandbox. Every provider runs in its test mode until live mode; sandbox rails ignore these fields.
Bring your own keys: in the console, Partners → Your provider accounts, connect your own account at any of these providers. The rails it carries then run on your account — your contract and pricing — ahead of Rey's; each attempt shows own_account: true. Keys are verified with the provider before they are saved, stored encrypted, and never shown again. Add the webhook URL the console gives you in the provider's dashboard so payouts settle. Test keys only until live mode.
curl -X POST https://reypayments.com/api/v1/payments \
-H "Authorization: Bearer rey_sk_test_…" \
-H "Idempotency-Key: 6f1c2d8e-4b7a-4f0e-9a51-3c2b1d0e9f87" \
-H "Content-Type: application/json" \
-d '{"amount":100000,"currency":"USD","destination_currency":"BRL","destination_country":"BR","beneficiary":{"name":"Ana Souza","account":"12345-6"},"description":"Invoice 1042"}'{
"id": "pay_3kZ9vQ2mXw7aB1cD4eFg",
"object": "payment",
"mode": "test",
"status": "succeeded",
"amount": 100000,
"currency": "USD",
"destination_amount": 537570,
"destination_currency": "BRL",
"destination_country": "BR",
"fee": 450,
"partner": "pix",
"strategy": "balanced",
"beneficiary": { "name": "Ana Souza", "account": "12345-6" },
"description": "Invoice 1042",
"metadata": {},
"identity": null,
"failure": null,
"created": 1764072000,
"settled_at": 1764072003,
"attempts": [
{ "partner": "pix", "provider": "sandbox", "own_account": false, "sequence": 1,
"status": "succeeded", "score": 195,
"latency_ms": 141, "error": null, "reference": "pix_9d2e7a41c0b3f856" }
]
}A payout every rail declined is still a 200 response, with status: "failed" and a failure object (code, message). Branch on status, not on the HTTP code. fee, partner and destination_amount are set once a rail accepts the payout — on processing, succeeded and returned payments — and are null on a failed or canceled one, even if a live provider accepted it first (the attempts still show which rail tried). settled_at is null until the payment succeeds; on a sandbox rail it is the rail's expected settlement time.
Each attempt has a status of succeeded, failed or pending (a live provider accepted it and the result follows), the provider that carried it (sandbox, increase, airwallex, dlocal, circle, thunes, nium, bvnk, bridge, triplea or stripe), and own_account (whether it ran on your own provider account). error is the attempt's failure code, or the return reason on a returned payout.
Refusals before any money moves are errors: 422 unsupported_source_currency, 422 no_route (no enabled rail serves the corridor), 422 beneficiary_incomplete, 402 insufficient_funds, 404 identity_not_found, 422 identity_not_verified, 409 idempotency_conflict.
GET /api/v1/payments
Your payments, newest first. List items omit attempts. has_more is true when another page follows.
- limit
- 1–100, default 25.
- starting_after
- A payment id — returns the payments created before it. Pass the last id of a page to get the next.
- status
- Filter:
processing,succeeded,failed,returnedorcanceled.
curl https://reypayments.com/api/v1/payments?limit=10&status=succeeded \
-H "Authorization: Bearer rey_sk_test_…"{ "object": "list", "data": [ { "id": "pay_…", "object": "payment", … } ], "has_more": true }An unknown starting_after returns 400 invalid_cursor.
GET /api/v1/payments/:id
One payment with every routing attempt in order. Unknown ids return 404 payment_not_found.
curl https://reypayments.com/api/v1/payments/pay_3kZ9vQ2mXw7aB1cD4eFg \
-H "Authorization: Bearer rey_sk_test_…"POST /api/v1/payments/:id/cancel
Stop a payout a live provider accepted but hasn't sent yet. Rey asks the provider to cancel it; when the provider confirms, the payment becomes canceled, the held funds (fees included) go back to your balance, and payment.canceled fires. Stripe, Increase, Airwallex, Thunes, Nium, Bridge and Triple-A support cancelling, each only until the payout is dispatched; dLocal, Circle and BVNK payouts can't be canceled. Sandbox payouts settle at once, so there is nothing to cancel. Anything else — a payment that is already final, a rail that can't cancel, or a provider that refuses — returns 409 payment_not_cancelable and leaves the payment as it was.
curl -X POST https://reypayments.com/api/v1/payments/pay_3kZ9vQ2mXw7aB1cD4eFg/cancel \
-H "Authorization: Bearer rey_sk_test_…"Partners
GET /api/v1/partners
Every rail Rey can route over and whether it is switched on for you. Switch rails on or off in the console; a switched-off rail is never quoted.
curl https://reypayments.com/api/v1/partners \
-H "Authorization: Bearer rey_sk_test_…"{
"object": "list",
"data": [
{ "id": "pix", "name": "Pix", "kind": "bank", "enabled": true,
"fee_bps": 30, "fixed_fee_usd_cents": 0, "settlement_seconds": 3,
"corridors": [{ "currency": "BRL", "countries": ["BR"] }] }
]
}| id | Rail | Kind | Pays out | Partner fee | Settles in |
|---|---|---|---|---|---|
ach | ACH | bank | USD → US | 5 bps + $0.25 | 1 day |
rtp | RTP / FedNow | bank | USD → US | 10 bps + $0.45 | 5 s |
sepa-instant | SEPA Instant | bank | EUR → AT, BE, DE, ES, FI, FR, IE, IT, LU, NL, PT | 18 bps + $0.20 | 10 s |
faster-payments | Faster Payments | bank | GBP → GB | 15 bps + $0.10 | 10 s |
pix | Pix | bank | BRL → BR | 30 bps | 3 s |
spei | SPEI | bank | MXN → MX | 28 bps | 15 s |
upi | UPI / IMPS | bank | INR → IN | 35 bps | 8 s |
transferencias | Transferencias 3.0 | bank | ARS → AR | 40 bps | 10 s |
card-push | Card push | card | USD → US; EUR → AT, BE, DE, ES, FI, FR, IE, IT, LU, NL, PT; GBP → GB | 90 bps + $0.25 | 30 s |
swift | SWIFT | bank | USD → anywhere; EUR → anywhere; GBP → anywhere | 60 bps + $15.00 | 2 days |
usdy | Rey Pay · USDY | stablecoin | USDY → anywhere | 8 bps | 2 s |
usdc | USDC | stablecoin | USDC → anywhere | 5 bps + $0.05 | 15 s |
countries: "*" means the rail reaches any country in that currency.
Identities (Rey ID)
Rey ID runs KYC through 1Profile Verify. Create an identity, send the person to its verification_url, then read the identity back: a pending identity is re-checked with 1Profile on every read, so polling — or waiting for the identity.approved webhook — is enough. Rey also re-checks pending identities in the background every ten minutes (for up to 30 days), so the webhook fires even if you never poll. verification_url is set only while the identity is pending, and shared_data only once it is approved. Approved identities are re-checked once a day for a year, so a revocation reaches you as identity.revoked. Each identity you create costs $0.50, debited from your USD balance; when the balance can't cover it the request fails with 402 insufficient_funds and no check is opened.
Statuses: pending, approved, declined, expired, canceled, revoked.
POST /api/v1/identities
- reference_id
- Required. Your own id for the person, 1–200 characters.
- Optional. A valid email address; prefills the 1Profile flow.
curl -X POST https://reypayments.com/api/v1/identities \
-H "Authorization: Bearer rey_sk_test_…" \
-H "Content-Type: application/json" \
-d '{"reference_id":"user_8812","email":"ana@example.com"}'{
"id": "idn_Qm3x8Lr2Vt6pN0sK9wYb",
"object": "identity",
"reference_id": "user_8812",
"email": "ana@example.com",
"status": "pending",
"verification_url": "https://…",
"shared_data": null,
"created": 1764072000,
"checked_at": null
}503 identity_not_configured means Rey ID is not set up for this deployment yet; 502 identity_provider_error means 1Profile refused the request.
GET /api/v1/identities
Your latest 50 identities, newest first, as { "object": "list", "data": [ … ] }. There is no pagination, and listing does not re-check pending identities — read one by id for that.
curl https://reypayments.com/api/v1/identities \
-H "Authorization: Bearer rey_sk_test_…"GET /api/v1/identities/:id
One identity. If it is still pending, Rey asks 1Profile for the latest result first and records any change (firing the matching webhook), so this call can also return 502 identity_provider_error. Unknown ids return 404 identity_not_found.
curl https://reypayments.com/api/v1/identities/idn_Qm3x8Lr2Vt6pN0sK9wYb \
-H "Authorization: Bearer rey_sk_test_…"Balance
GET /api/v1/balance
What you have available to pay out, in minor units of your settlement currency. Every new test workspace starts with $1,000,000.00 (top up from Settings in the console). A payment's full amount is held the moment it is created, so processing payments are already deducted; a failed payment releases the hold, and a returned one credits back the amount less fee. Each Rey ID check debits $0.50.
curl https://reypayments.com/api/v1/balance \
-H "Authorization: Bearer rey_sk_test_…"{ "object": "balance", "mode": "test", "currency": "USD", "available": 99900000 }Sandbox test scenarios
Sandbox outcomes are deterministic: the same payment, rail and attempt always behave the same way, and each rail succeeds about as often as its real counterpart. Sandbox payouts settle within the create request, so a sandbox payment never stays processing (only a read racing the create can see it mid-flight). To force a path on a sandbox rail (rails on a live provider ignore it), set the beneficiary's account:
| beneficiary.account | What happens |
|---|---|
fail | Every rail declines with account_closed (not retryable). The payment ends failed after one attempt. |
fail_first | The first rail returns partner_unavailable (retryable); Rey fails over and the next rail pays out. Look for two attempts. A corridor with one rail ends failed. |
| anything else | Normal sandbox behaviour — usually succeeds; a rare partner_declined triggers failover. |
curl -X POST https://reypayments.com/api/v1/payments \
-H "Authorization: Bearer rey_sk_test_…" \
-H "Content-Type: application/json" \
-d '{"amount":5000,"currency":"USD","destination_currency":"USD","destination_country":"US","beneficiary":{"name":"Test","account":"fail_first"}}'Webhooks
Add an endpoint in the console under Developers, or with POST /webhook_endpoints, to receive events as POST requests. Endpoints must be public https URLs: Rey resolves the host when you add the endpoint and again before every delivery, and refuses localhost, private, link-local and carrier-grade NAT addresses (422 url_not_public). Each endpoint gets its own signing secret (whsec_…, shown once) and can subscribe to all events (*) or a list.
- payment.processing
- A live provider accepted the payout; the result follows.
- payment.succeeded
- A payment paid out.
- payment.failed
- Every attempt failed, or the rail rejected an accepted payout.
- payment.returned
- A settled payout came back from the beneficiary's bank; the
amountlessfeeis back in your balance. - payment.canceled
- A payout was canceled before the provider sent it; the full
amountis back in your balance. - identity.created
- An identity was opened.
- identity.approved
- The person passed verification and shared their data (
shared_data). - identity.declined
- Verification failed.
- identity.revoked
- The person withdrew their shared data. Rey re-checks approved identities with 1Profile once a day (for a year), so this arrives within about a day of the revocation;
shared_datais thennull.
For payment.* events data is the payment with its attempts, exactly as GET /payments/:id returns it; for identity.* events it is the identity. An identity that ends expired or canceled sends no event.
POST /your/webhook HTTP/1.1
Content-Type: application/json
User-Agent: Rey-Webhooks/1.0
Rey-Signature: t=1764072000,v1=5f2b…c9e1
{ "id": "evt_…", "type": "payment.succeeded", "created": 1764072000, "data": { … } }Answer with any 2xx within 10 seconds. Redirects are not followed and count as a failure. A network error, timeout, 429 or 5xx is retried: twice more right away (2 s, then 8 s later), then 10 minutes, 1 hour, 6 hours and 24 hours later — seven attempts in all, each freshly signed. The later retries are scheduled in the database, so they survive restarts and deploys. Every attempt is logged in the console with its response status. Any other non-2xx answer is treated as a rejection and not retried. Make your handler idempotent on the event id — a retry can arrive after you already processed it — and reconcile with GET /payments/:id or GET /identities/:id if you ever miss one.
Managing endpoints
POST /api/v1/webhook_endpoints registers an endpoint: url (required, public https) and events (optional list of event types, or ["*"] — the default — for every event). The response is the endpoint plus its signing secret, returned only this once. GET /api/v1/webhook_endpoints lists endpoints and GET /api/v1/webhook_endpoints/:id reads one (never with the secret); DELETE /api/v1/webhook_endpoints/:id removes it and stops its pending retries. Changes made with the API show in the console's audit log under the key that made them. Over MCP, agents can list endpoints (list_webhook_endpoints) but not create or delete them.
curl -X POST https://reypayments.com/api/v1/webhook_endpoints \
-H "Authorization: Bearer rey_sk_test_…" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/rey/webhooks","events":["payment.succeeded","payment.failed"]}'{
"id": "whe_7Qm2…",
"object": "webhook_endpoint",
"url": "https://example.com/rey/webhooks",
"events": ["payment.succeeded", "payment.failed"],
"enabled": true,
"created": 1764072000,
"secret": "whsec_…"
}Verifying signatures
v1 is the hex HMAC-SHA256 of "<t>.<raw body>" keyed with your endpoint secret. Verify against the raw request body (before JSON parsing), compare in constant time, and reject timestamps more than five minutes old to stop replays.
import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyReySignature(secret, rawBody, header, toleranceSeconds = 300) {
const parts = Object.fromEntries(
header.split(",").map((part) => {
const [key, ...rest] = part.split("=");
return [key.trim(), rest.join("=")];
}),
);
const timestamp = Number(parts.t);
if (!Number.isFinite(timestamp) || !parts.v1) return false;
if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;
const expected = createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`)
.digest();
const received = Buffer.from(parts.v1, "hex");
return received.length === expected.length && timingSafeEqual(received, expected);
}
// e.g. in a Next.js route handler — WEBHOOK_SECRET is the endpoint's whsec_… secret
export async function POST(req) {
const body = await req.text();
const ok = verifyReySignature(WEBHOOK_SECRET, body,
req.headers.get("rey-signature") ?? "");
if (!ok) return new Response("bad signature", { status: 400 });
const event = JSON.parse(body);
// handle event.type …
return new Response(null, { status: 204 });
}MCP and agents
Rey runs a Model Context Protocol server, so an AI agent — Claude, Cursor, or your own — can quote, pay and look things up with the same rules as the REST API. Each tool calls the endpoint it mirrors, with the same validation, limits, errors and test mode.
- URL
https://reypayments.com/api/mcp— Streamable HTTP, stateless.- Auth
- The same secret key as the API:
Authorization: Bearer rey_sk_test_…. Each tool acts for that key's workspace and counts against its rate limit. A cancel made over MCP shows in the console's audit log under the key, like one made with the API. - Errors
- A refused call returns a tool result with
isError: trueand the API's own{ error: { code, message } }, so the agent can read and correct it.
claude mcp add --transport http rey https://reypayments.com/api/mcp \
--header "Authorization: Bearer rey_sk_test_…"{
"mcpServers": {
"rey": {
"url": "https://reypayments.com/api/mcp",
"headers": { "Authorization": "Bearer rey_sk_test_…" }
}
}
}| Tool | What it does | Writes |
|---|---|---|
get_balance | What the workspace has available to pay out, in minor units of its settlement currency. | No |
list_partners | The payment rails Rey routes over: fees, settlement time, corridors, and whether each is enabled for this workspace. | No |
quote_payment | Rank every rail that can carry a payment by cost and speed, without moving money. | No |
create_payment | Route and execute a payout from the workspace's balance (test mode). | Yes |
get_payment | One payment with its status and every routing attempt (rail, provider, fee, outcome). | No |
cancel_payment | Stop a payout that is still processing on a provider that supports cancelling (Stripe, Increase, Airwallex, Thunes, Nium, Bridge, Triple-A) before it's sent; the funds go back to the balance. | Yes |
list_payments | Payments, newest first. | No |
create_identity | Open a 1Profile Verify identity check for a person. | Yes |
get_identity | One identity check. | No |
list_identities | Identity checks, newest first. | No |
list_webhook_endpoints | Where the workspace's webhook events are sent: each endpoint's URL, subscribed event types (* = all) and whether it is enabled. | No |
Tools that write are marked destructive, so clients ask before running them. A key can move test money from your balance: give agents a key of their own under Developers, and revoke it there when you're done.
Signed in, the console's Assistant page puts the same tools behind a chat. It answers from your workspace's data, and asks you to approve anything that creates or cancels a payment or starts a Rey ID check before running it.
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_input | The body or query failed validation — see issues. |
| 400 | invalid_json | The body is not valid JSON. |
| 400 | invalid_cursor | starting_after is not one of your payment ids. |
| 401 | unauthenticated | No Authorization: Bearer key, or a malformed one. |
| 401 | invalid_api_key | The key is unknown or revoked. |
| 402 | insufficient_funds | Your balance does not cover the payment, or the $0.50 fee for a new identity. |
| 404 | payment_not_found | No payment with that id in your workspace. |
| 404 | identity_not_found | No identity with that id in your workspace. |
| 404 | not_found | No webhook endpoint with that id in your workspace. |
| 409 | idempotency_conflict | The Idempotency-Key was used with different parameters. |
| 409 | payment_not_cancelable | The payment is final, its rail can't cancel, or the provider refused. |
| 422 | unsupported_source_currency | currency is not your settlement currency. |
| 422 | no_route | No enabled rail pays out that currency to that country. |
| 422 | beneficiary_incomplete | The rails that serve the corridor run on live providers and the beneficiary lacks their fields. |
| 422 | identity_not_verified | The identity passed with the payment is not approved. |
| 422 | url_not_public | The webhook URL's host doesn't resolve, or resolves to a private, loopback or link-local address. |
| 429 | rate_limited | More than 100 requests in a sliding 10-second window on one key. No Retry-After header is sent; back off and retry. |
| 500 | internal_error | Something broke on our side. Safe to retry with the same Idempotency-Key. |
| 502 | identity_provider_error | 1Profile Verify rejected the request (creating an identity, or re-checking a pending one). |
| 503 | identity_not_configured | Rey ID is not configured for this deployment. |
Payout failures are not errors — they are payments with status: "failed" and a failure object holding the last attempt's reason. On sandbox rails failure.code is account_closed, partner_unavailable or partner_declined; a live provider reports its own snake_case reason (for example invalid_beneficiary or network_error). A returned payment also carries failure, with payout_returned unless the provider gave a reason; a canceled one carries failure.code canceled, and its attempt ends failed with error canceled.