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:

GuideWhy
Getting StartedPlatform overview and setup
Api BasicsRequired headers and request configuration
AuthenticationHow to obtain access tokens
RecipientsCorridor transfers pay a saved recipient
CapabilitiesEach 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

CorridorPayment RailCurrencyCorridor groupConfirm step
sepaSEPAEURBank accountNo
achACHUSDBank accountNo
faster-paymentsFaster PaymentsGBPBank accountNo
fedwireFEDWIREUSDBank accountNo
swiftSWIFTUSD, EUR, GBP — the currency of the account_idBank accountNo
pixPIXBRLCPNYes
speiSPEIMXNCPNYes
cipsCIPSCNYCPNYes
chatsCHATSHKDCPNYes
fps_hkFPSHKDCPNYes
impsIMPS/NEFT/UPIINROff-rampNo
instapayInstaPay/PESONetPHPOff-rampNo
bi-fastBI-FASTIDROff-rampNo
nipNIPNGNOff-rampNo
ippIPPAEDOff-rampNo
psePSECOPOff-rampNo

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 groupaccount_id on estimateFundsFlow
Bank account — sepa, ach, faster-payments, fedwire, swiftRequiredWirex debits the user's wallet during initiateEstimate → Initiate
CPNNot usedYou send the funding transfer on-chainEstimate → Initiate → Confirm
Off-rampNot usedWirex debits the user's wallet during initiateEstimate → 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 Fedwire account to activate. Activating Ach details also adds Fedwire details to
    the USD account. GET /api/v1/bank/accounts lists each as its own entry, with the same account and
    routing numbers. Every USD entry's id starts with the same account UUID, so account_id is the same
    value for ach and fedwire. See ACH Bank Details.
  • fedwire pays only Fedwire payment details, and ach only Ach details. A recipient created with
    type: "Ach" cannot be paid over fedwire. Create the recipient with type: "Fedwire", or add
    Fedwire details to the existing one — see Create Recipients.
  • FedwireOut3rdParty depends on AchAccount, not on a provider profile. The corridor is available as
    soon as the ACH account is Active.

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.

FasterPaymentsAccountstatus_reasonMeaning
ActivationNotStartedAccount should be activated in order to use this capabilityOrder the account
NotAvailableCountry is not supportedNot offered in the user's residence country
NotAvailableCapability is not available for this nationalityThe 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_currency is refused with
    Currency EUR not supported for corridor faster-payments, expected GBP.
  • The spelling is faster-payments. fps, faster_payments and fasterpayments are refused with
    Unsupported corridor.
  • The recipient holds FasterPayment details. 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 under FasterPaymentsOut3rdParty.
  • A returned payout is a new item. The payout is not changed into Failed; the money comes back as a separate
    Inbound FasterPayment item, 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.statusSwiftAccountstatus_reasonWhat to do
No BankFrick entry, Pending or FailedExternalProviderRegistrationPendingRegistration with the external provider is still pendingWait. A Failed registration also reads this way — contact Wirex support if it does not move
ActiveActivationNotStartedAccount should be activated in order to use this capabilityOrder the accounts
Blocked, Deleted, NotRelevantNotAvailableExternal provider profile is not availableNo 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 callResult
ActivationNotStartedAll three currencies are ordered
InProgress or Active, a currency missingOnly the missing currencies are ordered; 200 with the new details_id
InProgress or Active, nothing missing200 with the existing details_id. Nothing is ordered
Any other status400 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.

Capabilitysupported_currencies
SwiftAccount, SwiftIn1stParty, SwiftOut1stPartyUSD, EUR, GBP
SwiftIn3rdParty, SwiftOut3rdPartyEUR

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 currencyCredited token
USDWUSD
EURWEUR
GBPWUSD — converted at the current rate

SWIFT Payouts

  • account_id sets the currency. Send the account half of the vIBAN in the payout currency. The
    estimate checks that it is one of the user's Swift accounts (not_found_or_not_owned otherwise). A
    destination_currency that differs is refused with Currency 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 under SwiftOut3rdParty, and a GBP or USD
    payout is refused at the estimate with account_id: GBP is not supported for SwiftOut3rdParty, only EUR
    (issue: currency_not_supported).
  • purpose is 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 Swift details with a required legal_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 ends Failed / payment_failed with a Reversal step and a full refund, fee included, on
    the same item.
CodePurpose
POGDPurchase of goods
POSVPurchase of services
PFEEProfessional fees
PERSPayroll
LODPLoan or deposit
BILLBill payment
RNDVResearch and development
BVENBusiness venture
ICPYIntercompany payment
CHDNCharitable donation
PROPReal estate
ESTHEstate settlement
GOVPGovernment payment
INVPInvestment
LIQMLiquidity 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.

ValueLimit
Beneficiary name — company_name, or first_name + space + last_name35 characters
iban34 characters
bic11 characters
legal_address.line1, legal_address.line2, legal_address.city70 characters
legal_address.zip_code11 characters
legal_address.state10 characters

Prerequisites

RequirementDetail
Corridor capabilityEach corridor maps to its own *Out3rdParty capability, which must be Active
Saved recipientrecipient_id and recipient_payment_details_id come from Recipients
Bank accountBank-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"]
}
FieldTypeRequiredDescription
destination_amountnumber or stringYesAmount the recipient receives, in the corridor's currency, as a JSON number or a decimal string. Must be greater than 0
destination_currencystringNoCorridor currency. When sent, must equal the corridor's currency exactly
recipient_idstringYesSaved recipient (UUID)
recipient_payment_details_idstringYesWhich of the recipient's payment details to pay (UUID)
account_idstringConditionalRequired 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_tokensstring[]NoRestrict 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"
    }
  ]
}
FieldDescription
idEstimation identifier. Pass as estimation_id to step 2
expires_atUnix timestamp after which the estimate is no longer valid
amountDestination amount, echoing the request
amount_precise, decimalsamount as an integer string, and its decimal places (18)
currencyDestination currency
estimated_amountsOne entry per token that could fund the payout
estimated_amounts[].amountAmount debited in the token, fee included
estimated_amounts[].precise_amountSame amount in the token's smallest unit
estimated_amounts[].token_addressToken contract address. This is the value for source_token_address in step 2
estimated_amounts[].token_symbolToken symbol
estimated_amounts[].rateDestination currency per 1 token
estimated_amounts[].rate_precise, rate_decimalsrate as an integer string, and its decimal places. Not returned on bank-account corridors
estimated_amounts[].fee_amountFee included in amount, token precision. Bank-account corridors only; omitted when the fee is zero
estimated_amounts[].fee_precise_amountSame 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_at is 1200 seconds after the call.
  • destination_amount is cut to two decimal places. 5.019 is quoted as 5.01. An amount below
    0.01 after the cut is refused with destination_amount: Invalid destination amount.
  • The fee is inside estimated_amounts[].amount. On fedwire, WUSD funds USD one for one, so the
    debit is destination_amount plus fee_amount. The fee is set per company and can be zero.
  • account_id is checked for format only. The estimate does not check that the UUID is one of the
    user's accounts. Send the account half of the Fedwire or Ach entry's id.
  • recipient_payment_details_id does 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 — Fedwire details for
    fedwire, Ach for ach, Sepa for sepa — whichever id you send. A recipient with no details of that
    type still gets a quote; the initiate is then refused with Invalid 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"
}
FieldTypeRequiredDescription
estimation_idstringYesThe id from step 1. Must be a valid UUID
source_token_addressstringYesToken to spend. Must be a valid, non-zero address from estimated_amounts
referencestringNoFree-text reference carried on the payment
transaction_authorizationobjectConditionalRequired 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
      }
    }
  ]
}
FieldDescription
transfer_idTransfer identifier. Required by step 3 when there is one
statusTransfer status
required_actionsPresent only when the corridor needs something from you. Absent means the transfer is already in flight
required_actions[].typeAction type. FundTransfer is the only type currently issued
required_actions[].data.destination_addressAddress to send funds to
required_actions[].data.token_addressToken to send
required_actions[].data.amountAmount in the token's smallest unit
required_actions[].data.chain_idChain to send on
required_actions[].data.expires_atUnix 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_actions key, 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[].amount of
    source_token_address, within seconds of the 200.
  • An estimate is single-use, and a refused initiate uses it up. A second initiate with the same
    estimation_id returns 500 ErrorExpired Estimation expired or executed. This also applies after a
    refusal — Invalid recipient details, Insufficient funds, or the 500 for a long reference: 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 to POST /api/v3/bank/initiate/ach is paid out as a Fedwire transfer. Use the same
    {corridor} in both calls.
  • reference is at most 255 characters. A longer value fails with 500 ErrorGeneral Database 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.

FieldValue
destination.typeFedwireBankAccount — bank_account carries the payee's account_number, routing_number, bank_name, owner_name, is_business
source_amount.amountThe 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
referenceThe reference sent to initiate
statusstatus_reasonMeaning
Pendingawaiting_chargeThe wallet debit is being made
Pendingawaiting_paymentDebited; the wire is with the bank
Completedpayment_doneThe wire was paid. Steps: Initiated, CryptoOut, Review, BankOut, Completed
Failedpayment_failedThe 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"
      }
    }
  ]
}
FieldTypeRequiredDescription
transfer_idstringYesThe transfer_id from step 2. Must be a valid UUID
actionsarrayYesExactly one action. Zero or more than one is refused
actions[].typestringYesMust be FundTransfer
actions[].dataobjectYesAction payload
actions[].data.tx_hashstringYesHash 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"
}
FieldDescription
transfer_idTransfer identifier
statusTransfer status after confirmation
tx_hashFunding 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_at is 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_at is 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 though actions is a list.
  • FundTransfer is the only action type. Any other type value is refused.
  • Confirm is CPN-only. Calling it on a bank-account or off-ramp corridor — fedwire included — is an
    error, not a no-op.
  • The fee is inside the debit. estimated_amounts[].amount already includes the fee; fund the
    wallet for that amount, not for destination_amount.
  • destination_currency cannot 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 DetailsDescriptionResolution
corridor: Unsupported corridor: {value}Corridor not in the listUse a value from Corridors
destination_amount: Amount should be greater than 0Zero or negative amountSend a positive amount
destination_amount: Invalid destination amountBank-account corridors: below 0.01 after the cut to two decimalsSend at least 0.01
recipient_id: Recipient not found or does not belong to youThe recipient is another user's, or was deletedUse one of the user's recipients
recipient_id: Recipient ID is not a valid UUIDMalformed recipientUse the id from the recipients API
recipient_payment_details_id: Recipient Payment Details ID is not a valid UUIDMalformed payment detailsUse the id from the recipient's payment details
account_id: Account ID is required for {corridor} corridorMissing on a bank-account corridorSend the account id
account_id: Account ID is not a valid UUIDMalformed account idSend the account UUID from GET /api/v1/bank/accounts
source_tokens: Token address is invalidAn entry is not a valid address. token details the offending valueSend valid contract addresses
destination_currency: Currency {x} not supported for corridor {y}, expected {z}Currency does not match the corridorOmit the field or send the corridor's currency
estimation_id: Estimation ID is not a valid UUIDMalformed estimationUse id from the estimate response
source_token_address: SourceTokenAddress is required and should be a valid Ethereum addressMissing or zero addressUse a token_address from estimated_amounts
transfer_id: Transfer ID is not a valid UUIDMalformed transferUse transfer_id from the initiate response
actions: Exactly one action is requiredZero or multiple actionsSend exactly one
actions: Action item cannot be emptyNull entry in the arraySend a populated action
actions.type: Unsupported action type: {value}Type other than FundTransferSend FundTransfer
actions.data: Action data is requiredMissing data objectInclude the payload
actions.data.tx_hash: tx_hash is requiredEmpty hashSend the funding transaction hash
actions.data.tx_hash: tx_hash must have 0x prefixMissing prefixPrefix the hash
actions.data.tx_hash: tx_hash payload is emptyOnly 0x sentSend the full hash
actions.data.tx_hash: tx_hash must be a valid hex stringNon-hex charactersSend a hex-encoded hash
corridor: Confirm step is supported only for CPN corridorsConfirm called on a non-CPN corridorSkip the confirm step
corridor: Unknown provider for corridor: {value}Registry entry has no provider mappingContact Wirex
corridor: Invalid corridor typeCorridor has no capability mappingContact Wirex

Initiate Errors — Bank-Account Corridors

HTTPError ReasonDescriptionResolution
400ErrorInsufficientFundsInsufficient funds. error_details carries availableBalance and requiredAmount in the token's smallest unit. The estimate is spentFund the wallet or pick another quoted token, then estimate again
500ErrorExpiredEstimation expired or executed — past expires_at, already initiated, or spent by a refused initiateEstimate again
500ErrorNotFoundInvalid 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 spentAdd details of that type to the recipient and estimate again
500ErrorGeneralDatabase error — reference is longer than 255 characters. No transfer is createdShorten reference and estimate again

These refusals come back as 500, not 400. ErrorExpired, Invalid recipient details and the long
reference carry CategoryInternalFailure. Branch on error_reason, and do not retry the same
estimation_id on a 500 — 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.


Did this page help you?