Corridor Transfers
Send payouts over 16 payment rails through a single estimate, initiate and confirm API.
Before You Start
Read the following guides before proceeding:
| Guide | Why |
|---|---|
| Getting Started | Platform overview and setup |
| Api Basics | Required headers and request configuration |
| Authentication | How to obtain access tokens |
| Recipients | Corridor transfers pay a saved recipient |
| Capabilities | Each corridor is gated by its own capability |
Overview
The v3 bank API is a single set of three endpoints that covers every payout rail Wirex supports —
SEPA, ACH, PIX, SPEI, UPI and eleven more. The corridor is a path parameter, so adding a new rail to
your integration means changing one string, not writing a new flow.
POST /api/v3/bank/estimate/{corridor}
POST /api/v3/bank/initiate/{corridor}
POST /api/v3/bank/confirm/{corridor}
This differs from SEPA and ACH,
which are documented against the older v2 estimate and v1 transfer endpoints. Those pages remain
accurate for those two rails. Use v3 when you need any of the other fourteen corridors, or when you
want one code path for all of them.
Whether you need the third step depends on the corridor's provider. Some corridors settle from
the user's balance; CPN corridors require an on-chain funding transfer that you make yourself and
then confirm. Resolve this before writing code — see Corridors.
Corridors
| Corridor | Payment Rail | Currency | Corridor group | Confirm step |
|---|---|---|---|---|
sepa | SEPA | EUR | Bank account | No |
ach | ACH | USD | Bank account | No |
faster-payments | Faster Payments | GBP | Bank account | No |
fedwire | FEDWIRE | USD | Bank account | No |
swift | SWIFT | USD, EUR, GBP — the currency of the account_id | Bank account | No |
pix | PIX | BRL | CPN | Yes |
spei | SPEI | MXN | CPN | Yes |
cips | CIPS | CNY | CPN | Yes |
chats | CHATS | HKD | CPN | Yes |
fps_hk | FPS | HKD | CPN | Yes |
imps | IMPS/NEFT/UPI | INR | Off-ramp | No |
instapay | InstaPay/PESONet | PHP | Off-ramp | No |
bi-fast | BI-FAST | IDR | Off-ramp | No |
nip | NIP | NGN | Off-ramp | No |
ipp | IPP | AED | Off-ramp | No |
pse | PSE | COP | Off-ramp | No |
Corridor spelling is not uniform: faster-payments and bi-fast are hyphenated, fps_hk uses an
underscore, everything else is a single word. Case is ignored — FEDWIRE works as fedwire. Anything
outside this list is refused with corridor: Unsupported corridor: {value}.
The corridor group drives two things: whether account_id is required on the estimate, and whether
the flow has two steps or three.
| Corridor group | account_id on estimate | Funds | Flow |
|---|---|---|---|
Bank account — sepa, ach, faster-payments, fedwire, swift | Required | Wirex debits the user's wallet during initiate | Estimate → Initiate |
| CPN | Not used | You send the funding transfer on-chain | Estimate → Initiate → Confirm |
| Off-ramp | Not used | Wirex debits the user's wallet during initiate | Estimate → Initiate |
Fedwire
fedwire is a bank-account corridor. It pays out from the user's USD account — the same account that
serves ach — and needs no confirm step.
- There is no
Fedwireaccount to activate. ActivatingAchdetails also addsFedwiredetails to
the USD account.GET /api/v1/bank/accountslists each as its own entry, with the same account and
routing numbers. Every USD entry'sidstarts with the same account UUID, soaccount_idis the same
value forachandfedwire. See ACH Bank Details. fedwirepays onlyFedwirepayment details, andachonlyAchdetails. A recipient created with
type: "Ach"cannot be paid overfedwire. Create the recipient withtype: "Fedwire", or add
Fedwiredetails to the existing one — see Create Recipients.FedwireOut3rdPartydepends onAchAccount, not on a provider profile. The corridor is available as
soon as the ACH account isActive.
FedNow
FedNow is for deposits only. Activating Ach details also adds FedNow details to the USD account,
listed as their own entry in GET /api/v1/bank/accounts with the same account and routing numbers, so the
user can receive FedNow credits. There is no FedNow payout corridor: send USD payouts over ach or
fedwire. An incoming FedNow credit is an Inbound activity of type FedNow — see
ACH Bank Details.
Faster Payments
faster-payments pays out from the user's GBP account, with no confirm step.
Faster Payments Account
Read FasterPaymentsAccount in the user's capabilities. At ActivationNotStarted, order the account:
POST /api/v1/bank/accounts
{
"account_type": "FasterPayment"
}The response carries details_id; the account turns Active and is listed by
GET /api/v1/bank/accounts with an 8-digit details.account_number and a 6-digit details.sort_code.
Ordering again while the capability is InProgress or Active returns 200 with the same
details_id. FasterPayment is singular — FasterPayments is refused with
Invalid value for account type.
FasterPaymentsAccount | status_reason | Meaning |
|---|---|---|
ActivationNotStarted | Account should be activated in order to use this capability | Order the account |
NotAvailable | Country is not supported | Not offered in the user's residence country |
NotAvailable | Capability is not available for this nationality | The user's nationality is on the restricted list. No API call changes this |
FasterPaymentsIn1stParty, FasterPaymentsIn3rdParty, FasterPaymentsOut1stParty and
FasterPaymentsOut3rdParty all have FasterPaymentsAccount as their prerequisite.
Faster Payments Deposits
A GBP payment to the account arrives as an Inbound FasterPayment item, Pending (in_review) →
Completed (credit_done). There is no GBP token: the user is credited in WUSD (or the company's
preferred deposit token), converted at the current rate. When the company charges a deposit fee, source_amount is the
amount after the fee and the fee is in fee_amount.
Faster Payments Payouts
- GBP only. Any other
destination_currencyis refused with
Currency EUR not supported for corridor faster-payments, expected GBP. - The spelling is
faster-payments.fps,faster_paymentsandfasterpaymentsare refused with
Unsupported corridor. - The recipient holds
FasterPaymentdetails. Creating it returns a Confirmation of Payee
name_check— see Create Recipients. - The party. A person recipient named exactly like the user is paid under
FasterPaymentsOut1stParty; anyone else underFasterPaymentsOut3rdParty. - A returned payout is a new item. The payout is not changed into
Failed; the money comes back as a separate
InboundFasterPaymentitem, credited like a deposit — converted from GBP at the rate of the day, and
net of the deposit fee when the company charges one, so the amount credited back differs from the amount
debited.
SWIFT
swift pays out from one of the user's three Bank Frick vIBANs — USD, EUR and GBP — with no confirm step.
SWIFT Account
Wirex registers the user with Bank Frick after KYC is approved. The registration appears in
external_providers on GET /api/v2/user and gates SwiftAccount:
{
"external_providers": [
{
"type": "BankFrick",
"bank_frick": {
"status": "Active",
"external_customer_id": "01a23c20-f7a0-7340-989f-fa7d22becda3"
}
}
]
}bank_frick.status | SwiftAccount | status_reason | What to do |
|---|---|---|---|
No BankFrick entry, Pending or Failed | ExternalProviderRegistrationPending | Registration with the external provider is still pending | Wait. A Failed registration also reads this way — contact Wirex support if it does not move |
Active | ActivationNotStarted | Account should be activated in order to use this capability | Order the accounts |
Blocked, Deleted, NotRelevant | NotAvailable | External provider profile is not available | No API call changes this |
The vIBANs are never opened automatically. One call orders all three currencies:
POST /api/v1/bank/accounts
{
"account_type": "Swift"
}The returned details_id belongs to one of them. GET /api/v1/bank/accounts lists three Swift
entries, one per currency, each on its own account:
{
"id": "529291db-8b0e-48e1-8964-0eb69c1fe7bb:ce1d7f21-dfd1-40d5-a2cd-e07473881fb6",
"currency": "USD",
"status": "Active",
"account_holder": "Oliver Grey",
"account_type": "Swift",
"details": {
"iban": "LI7708811V0LF6SEG2QYW",
"bic": "BFRILI22XXX",
"account_number": "",
"sort_code": "",
"routing_number": "",
"clabe": "",
"bank_name": "BANK FRICK AND CO AKTIENGESELLSCHAFT",
"bank_address": "Landstrasse 14, 9496 Balzers, Liechtenstein"
}
}SwiftAccount when you call | Result |
|---|---|
ActivationNotStarted | All three currencies are ordered |
InProgress or Active, a currency missing | Only the missing currencies are ordered; 200 with the new details_id |
InProgress or Active, nothing missing | 200 with the existing details_id. Nothing is ordered |
| Any other status | 400 Capability does not need activation |
When every SWIFT detail of the user is Closed or Failed, SwiftAccount returns to
ActivationNotStarted and the same call opens new vIBANs. A Blocked detail is not replaced.
| Capability | supported_currencies |
|---|---|
SwiftAccount, SwiftIn1stParty, SwiftOut1stParty | USD, EUR, GBP |
SwiftIn3rdParty, SwiftOut3rdParty | EUR |
The four payment capabilities have SwiftAccount as their prerequisite.
SWIFT Deposits
Give the payer the vIBAN, the BIC BFRILI22XXX, and details.bank_name and details.bank_address. The
wire's currency must match the vIBAN. A received wire is an Inbound Swift item, credited in a token
chosen by the wire's currency:
| Wire currency | Credited token |
|---|---|
| USD | WUSD |
| EUR | WEUR |
| GBP | WUSD — converted at the current rate |
SWIFT Payouts
account_idsets the currency. Send the account half of the vIBAN in the payout currency. The
estimate checks that it is one of the user'sSwiftaccounts (not_found_or_not_ownedotherwise). A
destination_currencythat differs is refused withCurrency GBP not supported for account, expected EUR.- Third-party payouts are EUR only. A person recipient named exactly like the user is paid under
SwiftOut1stParty— USD, EUR or GBP. Anyone else is paid underSwiftOut3rdParty, and a GBP or USD
payout is refused at the estimate withaccount_id: GBP is not supported for SwiftOut3rdParty, only EUR
(issue: currency_not_supported). purposeis required for USD, on the estimate and again on the initiate — the estimate
validates it but does not keep it (required_for_swift_usd). The code is shown in the activity as
destination.bank_account.purpose.- The recipient holds
Swiftdetails with a requiredlegal_address, and is a person or a company,
never both — see Create Recipients. The estimate
re-checks it against the SWIFT field limits below. - No IBAN checksum is validated. A wire to an IBAN with wrong check digits is refused by the bank:
the payout endsFailed/payment_failedwith aReversalstep and a full refund, fee included, on
the same item.
| Code | Purpose |
|---|---|
POGD | Purchase of goods |
POSV | Purchase of services |
PFEE | Professional fees |
PERS | Payroll |
LODP | Loan or deposit |
BILL | Bill payment |
RNDV | Research and development |
BVEN | Business venture |
ICPY | Intercompany payment |
CHDN | Charitable donation |
PROP | Real estate |
ESTH | Estate settlement |
GOVP | Government payment |
INVP | Investment |
LIQM | Liquidity management |
SWIFT Field Limits
Checked at the estimate, not when the recipient is stored. A breach is refused with
ErrorInvalidField, field: recipient_payment_details_id, issue: too_long.
| Value | Limit |
|---|---|
Beneficiary name — company_name, or first_name + space + last_name | 35 characters |
iban | 34 characters |
bic | 11 characters |
legal_address.line1, legal_address.line2, legal_address.city | 70 characters |
legal_address.zip_code | 11 characters |
legal_address.state | 10 characters |
Prerequisites
| Requirement | Detail |
|---|---|
| Corridor capability | Each corridor maps to its own *Out3rdParty capability, which must be Active |
| Saved recipient | recipient_id and recipient_payment_details_id come from Recipients |
| Bank account | Bank-account corridors additionally require an account_id — the user's account in the corridor's currency. ach and fedwire both need an Active ACH account |
Capability names follow the corridor: sepa → SepaOut3rdParty, pix → PixOut3rdParty,
fps_hk → FpsHkOut3rdParty, and so on. On sepa, ach, faster-payments, fedwire and swift, an individual recipient whose name equals the user's
verified name is paid under the first-party capability (SepaOut1stParty, AchOut1stParty, FasterPaymentsOut1stParty, FedwireOut1stParty, SwiftOut1stParty) instead; business recipients are always third party. This is checked by the estimate. Check them with GET /api/v1/capabilities before offering
a corridor in your UI — an inactive capability fails the estimate, not the transfer, so the user
would otherwise hit the error after entering an amount.
Step 1: Estimate
POST /api/v3/bank/estimate/{corridor}
Produces an id (the estimation identifier) consumed by step 2, and the set of token amounts that
would fund the payout.
Request
{
"destination_amount": 100.00,
"destination_currency": "INR",
"recipient_id": "550e8400-e29b-41d4-a716-446655440000",
"recipient_payment_details_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"source_tokens": ["0x0774164DC20524Bb239b39D1DC42573C3E4C6976"]
}| Field | Type | Required | Description |
|---|---|---|---|
destination_amount | number or string | Yes | Amount the recipient receives, in the corridor's currency, as a JSON number or a decimal string. Must be greater than 0 |
destination_currency | string | No | Corridor currency. When sent, must equal the corridor's currency exactly |
recipient_id | string | Yes | Saved recipient (UUID) |
recipient_payment_details_id | string | Yes | Which of the recipient's payment details to pay (UUID) |
account_id | string | Conditional | Required for bank-account corridors (sepa, ach, faster-payments, fedwire, swift); not used otherwise. The account UUID — the part of the bank account id before :. The whole composite id is also accepted; only the part before : is read |
source_tokens | string[] | No | Restrict funding to these token contract addresses. All must be valid addresses |
destination_amount is what the recipient receives. The estimate works backwards from it to the
tokens that must be spent — so the figure you show the user as "you will pay" comes from the
response, not the request.
Response
{
"id": "00000000-0000-0000-0000-000000000001",
"expires_at": 1617223200,
"amount": 100,
"amount_precise": "100000000000000000000",
"decimals": 18,
"currency": "EUR",
"estimated_amounts": [
{
"amount": 116.38,
"precise_amount": "116380000000000000000",
"token_address": "0x0774164DC20524Bb239b39D1DC42573C3E4C6976",
"token_symbol": "WUSD",
"rate": 0.8708,
"fee_amount": 0.53,
"fee_precise_amount": "530000000000000000"
}
]
}| Field | Description |
|---|---|
id | Estimation identifier. Pass as estimation_id to step 2 |
expires_at | Unix timestamp after which the estimate is no longer valid |
amount | Destination amount, echoing the request |
amount_precise, decimals | amount as an integer string, and its decimal places (18) |
currency | Destination currency |
estimated_amounts | One entry per token that could fund the payout |
estimated_amounts[].amount | Amount debited in the token, fee included |
estimated_amounts[].precise_amount | Same amount in the token's smallest unit |
estimated_amounts[].token_address | Token contract address. This is the value for source_token_address in step 2 |
estimated_amounts[].token_symbol | Token symbol |
estimated_amounts[].rate | Destination currency per 1 token |
estimated_amounts[].rate_precise, rate_decimals | rate as an integer string, and its decimal places. Not returned on bank-account corridors |
estimated_amounts[].fee_amount | Fee included in amount, token precision. Bank-account corridors only; omitted when the fee is zero |
estimated_amounts[].fee_precise_amount | Same fee in the token's smallest unit. Bank-account corridors only; "0" when there is no fee |
estimated_amounts is a list of options, not a bill. Pick one entry and pass its token_address as
source_token_address in step 2. See Amounts for the
amount / precise_amount distinction.
For the bank-account corridors (fedwire included):
- An estimate is valid for 20 minutes.
expires_atis 1200 seconds after the call. destination_amountis cut to two decimal places.5.019is quoted as5.01. An amount below
0.01after the cut is refused withdestination_amount: Invalid destination amount.- The fee is inside
estimated_amounts[].amount. Onfedwire,WUSDfunds USD one for one, so the
debit isdestination_amountplusfee_amount. The fee is set per company and can be zero. account_idis checked for format only. The estimate does not check that the UUID is one of the
user's accounts. Send the account half of theFedwireorAchentry'sid.recipient_payment_details_iddoes not select the details that get paid. Only its UUID format is
checked. The payout goes to the recipient's details of the corridor's type —Fedwiredetails for
fedwire,Achforach,Sepaforsepa— whichever id you send. A recipient with no details of that
type still gets a quote; the initiate is then refused withInvalid recipient details. Check the
recipient's details type before you estimate.
Step 2: Initiate
POST /api/v3/bank/initiate/{corridor}
Request
{
"estimation_id": "00000000-0000-0000-0000-000000000001",
"source_token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"reference": "Payment for the services"
}| Field | Type | Required | Description |
|---|---|---|---|
estimation_id | string | Yes | The id from step 1. Must be a valid UUID |
source_token_address | string | Yes | Token to spend. Must be a valid, non-zero address from estimated_amounts |
reference | string | No | Free-text reference carried on the payment |
transaction_authorization | object | Conditional | Required in Signature mode — see Transaction Authorization |
Response
{
"transfer_id": "00000000-0000-0000-0000-000000000001",
"status": "pending",
"required_actions": [
{
"type": "FundTransfer",
"data": {
"destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "100000000",
"chain_id": 8453,
"expires_at": 1735689600
}
}
]
}| Field | Description |
|---|---|
transfer_id | Transfer identifier. Required by step 3 when there is one |
status | Transfer status |
required_actions | Present only when the corridor needs something from you. Absent means the transfer is already in flight |
required_actions[].type | Action type. FundTransfer is the only type currently issued |
required_actions[].data.destination_address | Address to send funds to |
required_actions[].data.token_address | Token to send |
required_actions[].data.amount | Amount in the token's smallest unit |
required_actions[].data.chain_id | Chain to send on |
required_actions[].data.expires_at | Unix timestamp after which the action is no longer accepted |
Branch on required_actions, not on the corridor name. When it is absent or empty, the transfer
is submitted and you are done. When it is present, perform the action on-chain and continue to step 3.
transfer_id is also the id of the outbound activity. Track it with GET /api/v2/activity/single/{transfer_id}
or the activity webhook.
For the bank-account corridors (fedwire included):
- The response is
{"transfer_id": "...", "status": "processing"}and nothing else. There is no
required_actionskey, and the user's wallet is already being debited. Do not call confirm. - The debit is the quoted amount. The wallet is debited exactly
estimated_amounts[].amountof
source_token_address, within seconds of the200. - An estimate is single-use, and a refused initiate uses it up. A second initiate with the same
estimation_idreturns500 ErrorExpiredEstimation expired or executed. This also applies after a
refusal —Invalid recipient details,Insufficient funds, or the500for a longreference: nothing
was debited, but the estimate is spent. Estimate again before retrying. - The payout runs on the corridor of the estimate, not the corridor in the initiate path. A
fedwire
estimate sent toPOST /api/v3/bank/initiate/achis paid out as a Fedwire transfer. Use the same
{corridor}in both calls. referenceis at most 255 characters. A longer value fails with500 ErrorGeneralDatabase error;
no transfer is created and nothing is debited.- There is no idempotency key. Every accepted initiate is a new transfer. After a network timeout,
check the activity feed before you estimate and initiate again.
Tracking a Fedwire Payout
The payout is an activity with id equal to transfer_id, type Fedwire and direction Outbound.
Filter the feed with GET /api/v2/activity/feed?types=Fedwire.
| Field | Value |
|---|---|
destination.type | FedwireBankAccount — bank_account carries the payee's account_number, routing_number, bank_name, owner_name, is_business |
source_amount.amount | The payout amount in WUSD, positive and without the fee — 25 for a 25.5625 WUSD debit. Read the debit from the estimate, not from this field |
reference | The reference sent to initiate |
status | status_reason | Meaning |
|---|---|---|
Pending | awaiting_charge | The wallet debit is being made |
Pending | awaiting_payment | Debited; the wire is with the bank |
Completed | payment_done | The wire was paid. Steps: Initiated, CryptoOut, Review, BankOut, Completed |
Failed | payment_failed | The bank returned the wire. Review, BankOut and Completed read Failed, a Reversal step reads Completed, and the full debit — fee included — is credited back |
Each change is also sent to the activity webhook.
Step 3: Confirm
POST /api/v3/bank/confirm/{corridor}
Only CPN corridors accept this call. Any other corridor is refused with
corridor: Confirm step is supported only for CPN corridors.
Send the funds described in required_actions on-chain first, then report the hash.
Request
{
"transfer_id": "00000000-0000-0000-0000-000000000001",
"actions": [
{
"type": "FundTransfer",
"data": {
"tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
}
]
}| Field | Type | Required | Description |
|---|---|---|---|
transfer_id | string | Yes | The transfer_id from step 2. Must be a valid UUID |
actions | array | Yes | Exactly one action. Zero or more than one is refused |
actions[].type | string | Yes | Must be FundTransfer |
actions[].data | object | Yes | Action payload |
actions[].data.tx_hash | string | Yes | Hash of the funding transaction. 0x-prefixed, valid hex, non-empty after the prefix |
Response
{
"transfer_id": "00000000-0000-0000-0000-000000000001",
"status": "processing",
"tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}| Field | Description |
|---|---|
transfer_id | Transfer identifier |
status | Transfer status after confirmation |
tx_hash | Funding transaction hash, when recorded |
Code Examples
const headers = {
'Authorization': `Bearer ${accessToken}`,
'X-User-Wallet': userEoaAddress,
'X-Chain-Id': chainId,
'Content-Type': 'application/json'
};
// Step 1: estimate
const estimate = await fetch(`${baseUrl}/api/v3/bank/estimate/${corridor}`, {
method: 'POST',
headers,
body: JSON.stringify({
destination_amount: 100.00,
recipient_id: recipientId,
recipient_payment_details_id: recipientPaymentDetailsId
})
}).then(r => r.json());
const funding = estimate.estimated_amounts[0];
// Step 2: initiate
const transfer = await fetch(`${baseUrl}/api/v3/bank/initiate/${corridor}`, {
method: 'POST',
headers,
body: JSON.stringify({
estimation_id: estimate.id,
source_token_address: funding.token_address,
reference: 'Payment for the services'
})
}).then(r => r.json());
// Step 3: only when the corridor asked for it
if (transfer.required_actions?.length) {
const action = transfer.required_actions[0];
const txHash = await sendTokens(
action.data.destination_address,
action.data.token_address,
action.data.amount
);
await fetch(`${baseUrl}/api/v3/bank/confirm/${corridor}`, {
method: 'POST',
headers,
body: JSON.stringify({
transfer_id: transfer.transfer_id,
actions: [{ type: 'FundTransfer', data: { tx_hash: txHash } }]
})
});
}headers = {
"Authorization": f"Bearer {access_token}",
"X-User-Wallet": user_eoa_address,
"X-Chain-Id": chain_id,
"Content-Type": "application/json"
}
# Step 1: estimate
estimate = requests.post(
f"{base_url}/api/v3/bank/estimate/{corridor}",
headers=headers,
json={
"destination_amount": 100.00,
"recipient_id": recipient_id,
"recipient_payment_details_id": recipient_payment_details_id
}
).json()
funding = estimate["estimated_amounts"][0]
# Step 2: initiate
transfer = requests.post(
f"{base_url}/api/v3/bank/initiate/{corridor}",
headers=headers,
json={
"estimation_id": estimate["id"],
"source_token_address": funding["token_address"],
"reference": "Payment for the services"
}
).json()
# Step 3: only when the corridor asked for it
if transfer.get("required_actions"):
action = transfer["required_actions"][0]
tx_hash = send_tokens(
action["data"]["destination_address"],
action["data"]["token_address"],
action["data"]["amount"]
)
requests.post(
f"{base_url}/api/v3/bank/confirm/{corridor}",
headers=headers,
json={
"transfer_id": transfer["transfer_id"],
"actions": [{"type": "FundTransfer", "data": {"tx_hash": tx_hash}}]
}
)// Step 1: estimate
estimateBody, _ := json.Marshal(map[string]interface{}{
"destination_amount": 100.00,
"recipient_id": recipientId,
"recipient_payment_details_id": recipientPaymentDetailsId,
})
req, _ := http.NewRequest("POST", baseURL+"/api/v3/bank/estimate/"+corridor, bytes.NewReader(estimateBody))
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("X-User-Wallet", userEoaAddress)
req.Header.Set("X-Chain-Id", chainId)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var estimate BankCorridorEstimateResponse
json.NewDecoder(resp.Body).Decode(&estimate)
funding := estimate.EstimatedAmounts[0]
// Step 2: initiate
initiateBody, _ := json.Marshal(map[string]string{
"estimation_id": estimate.Id,
"source_token_address": funding.TokenAddress,
"reference": "Payment for the services",
})
req, _ = http.NewRequest("POST", baseURL+"/api/v3/bank/initiate/"+corridor, bytes.NewReader(initiateBody))
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("X-User-Wallet", userEoaAddress)
req.Header.Set("X-Chain-Id", chainId)
req.Header.Set("Content-Type", "application/json")
resp, _ = http.DefaultClient.Do(req)
defer resp.Body.Close()
var transfer BankCorridorInitiateResponse
json.NewDecoder(resp.Body).Decode(&transfer)
// Step 3: only when the corridor asked for it
if len(transfer.RequiredActions) > 0 {
action := transfer.RequiredActions[0]
txHash := sendTokens(action.Data.DestinationAddress, action.Data.TokenAddress, action.Data.Amount)
confirmBody, _ := json.Marshal(map[string]interface{}{
"transfer_id": transfer.TransferId,
"actions": []map[string]interface{}{
{"type": "FundTransfer", "data": map[string]string{"tx_hash": txHash}},
},
})
req, _ = http.NewRequest("POST", baseURL+"/api/v3/bank/confirm/"+corridor, bytes.NewReader(confirmBody))
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("X-User-Wallet", userEoaAddress)
req.Header.Set("X-Chain-Id", chainId)
req.Header.Set("Content-Type", "application/json")
resp, _ = http.DefaultClient.Do(req)
defer resp.Body.Close()
}Limitations
- Estimates expire.
expires_atis a Unix timestamp; an initiate against a lapsed estimate fails
and you must re-estimate rather than retry. - Funding actions expire separately.
required_actions[].data.expires_atis its own deadline,
and it starts running at initiate — not when your on-chain transfer confirms. - Exactly one action per confirm. The endpoint refuses an empty array and refuses more than one
entry, even thoughactionsis a list. FundTransferis the only action type. Any othertypevalue is refused.- Confirm is CPN-only. Calling it on a bank-account or off-ramp corridor —
fedwireincluded — is an
error, not a no-op. - The fee is inside the debit.
estimated_amounts[].amountalready includes the fee; fund the
wallet for that amount, not fordestination_amount. destination_currencycannot override the corridor. It is validated against the corridor's own
currency and rejected on mismatch, so it can only ever restate what the path already fixed.
Error Handling
Validation Errors (400)
| Error Details | Description | Resolution |
|---|---|---|
corridor: Unsupported corridor: {value} | Corridor not in the list | Use a value from Corridors |
destination_amount: Amount should be greater than 0 | Zero or negative amount | Send a positive amount |
destination_amount: Invalid destination amount | Bank-account corridors: below 0.01 after the cut to two decimals | Send at least 0.01 |
recipient_id: Recipient not found or does not belong to you | The recipient is another user's, or was deleted | Use one of the user's recipients |
recipient_id: Recipient ID is not a valid UUID | Malformed recipient | Use the id from the recipients API |
recipient_payment_details_id: Recipient Payment Details ID is not a valid UUID | Malformed payment details | Use the id from the recipient's payment details |
account_id: Account ID is required for {corridor} corridor | Missing on a bank-account corridor | Send the account id |
account_id: Account ID is not a valid UUID | Malformed account id | Send the account UUID from GET /api/v1/bank/accounts |
source_tokens: Token address is invalid | An entry is not a valid address. token details the offending value | Send valid contract addresses |
destination_currency: Currency {x} not supported for corridor {y}, expected {z} | Currency does not match the corridor | Omit the field or send the corridor's currency |
estimation_id: Estimation ID is not a valid UUID | Malformed estimation | Use id from the estimate response |
source_token_address: SourceTokenAddress is required and should be a valid Ethereum address | Missing or zero address | Use a token_address from estimated_amounts |
transfer_id: Transfer ID is not a valid UUID | Malformed transfer | Use transfer_id from the initiate response |
actions: Exactly one action is required | Zero or multiple actions | Send exactly one |
actions: Action item cannot be empty | Null entry in the array | Send a populated action |
actions.type: Unsupported action type: {value} | Type other than FundTransfer | Send FundTransfer |
actions.data: Action data is required | Missing data object | Include the payload |
actions.data.tx_hash: tx_hash is required | Empty hash | Send the funding transaction hash |
actions.data.tx_hash: tx_hash must have 0x prefix | Missing prefix | Prefix the hash |
actions.data.tx_hash: tx_hash payload is empty | Only 0x sent | Send the full hash |
actions.data.tx_hash: tx_hash must be a valid hex string | Non-hex characters | Send a hex-encoded hash |
corridor: Confirm step is supported only for CPN corridors | Confirm called on a non-CPN corridor | Skip the confirm step |
corridor: Unknown provider for corridor: {value} | Registry entry has no provider mapping | Contact Wirex |
corridor: Invalid corridor type | Corridor has no capability mapping | Contact Wirex |
Initiate Errors — Bank-Account Corridors
| HTTP | Error Reason | Description | Resolution |
|---|---|---|---|
400 | ErrorInsufficientFunds | Insufficient funds. error_details carries availableBalance and requiredAmount in the token's smallest unit. The estimate is spent | Fund the wallet or pick another quoted token, then estimate again |
500 | ErrorExpired | Estimation expired or executed — past expires_at, already initiated, or spent by a refused initiate | Estimate again |
500 | ErrorNotFound | Invalid recipient details — the recipient holds no details of the corridor's type, e.g. an Ach-only recipient on fedwire. Nothing is debited; the estimate is spent | Add details of that type to the recipient and estimate again |
500 | ErrorGeneral | Database error — reference is longer than 255 characters. No transfer is created | Shorten reference and estimate again |
These refusals come back as
500, not400.ErrorExpired,Invalid recipient detailsand the long
referencecarryCategoryInternalFailure. Branch onerror_reason, and do not retry the same
estimation_idon a500— it is already spent.
Example Error Response
{
"error_reason": "ErrorGeneral",
"error_description": "Request failed validation",
"error_category": {
"category": "CategoryValidationFailure",
"http_status_code": 400
},
"error_details": [
{ "key": "account_id", "details": "Account ID is required for sepa corridor" }
]
}Capability Errors
An inactive corridor capability fails all three endpoints. The estimate is where you will see it
first. Resolve through Capabilities — the request itself is not the
problem.
Updated 1 day ago

