Helper API Reference

API reference for sandbox test event simulation.

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
OnboardingUser and wallet registration
KYCKYC verification requirements

Overview

The Sandbox Helper API at https://ramc.wirexapp.tech provides endpoints to simulate external events for testing. All endpoints use the user's email address to identify accounts.

Interactive API documentation is available at https://ramc.wirexapp.tech/api-docs/.


Mint Test Tokens

Mint test tokens directly to a user's wallet for testing purposes.

Endpoint

POST /account/retail/mint

Request

{
  "chainId": "84532",
  "token": "0x7Af7cDbd557eD302F7538Db1e3d094C8BBcA665c",
  "to": "0xAAFF0821A09A1Aac28B72dD3Ff410A7ea5FEb874",
  "amount": "250000000"
}
FieldTypeRequiredDescription
chainIdstringYesChain ID (84532 for Base Sepolia)
tokenstringYesToken contract address
tostringYesThe user's smart wallet address
amountstringYesAmount in the token’s smallest unit — multiply the decimal amount by 10^decimals

The amount is in the smallest unit, not whole tokens. Mint the base token: USDC and EURC have 6 decimals, so
250 USDC is "250000000". On a registered smart wallet USDC arrives 1:1 as WUSD and EURC as WEUR. The balance
can take more than a minute to appear.

See Credentials for sandbox token addresses.

Response

{
  "ok": "Hell yeah!"
}

Wallet Helpers

Helpers for creating sandbox wallets and moving test tokens. Transfer helpers take the owner's private key in
the request body — use them only with keys generated for the sandbox.

EndpointDescription
GET /account/generate?chainId=84532Returns a fresh key pair: { "address", "privateKey" }. Nothing is deployed
POST /account/retailDeploys a smart wallet for a fresh owner key and registers it under your company. Body: { "chainId": "84532", "companyId": "0x…" }. Returns wallet (owner EOA), privateKey and account (smart wallet)
GET /account/retail/balance?chainId=84532&account={address}&token={token}&decimals={decimals}Reads a token balance. Send the token's own decimals — the default is 18 on EVM and Tron, 7 on Stellar
POST /account/retail/transfer/requestRequests a token transfer from a smart wallet. Body: chainId, account, privateKey, token, to, amount (smallest unit). Returns { "hash", "call" }
POST /account/retail/transfer/executeExecutes the requested transfer. Body: chainId, account, privateKey and the call from the request
POST /account/retail/unwrap/transfer/requestAs transfer/request, but debits the synthetic token (unwrapToken, unwrapAmount) and sends the base token (token, amount). Execute with transfer/execute

Mint to and transfer from account, the smart wallet. Register the user with the owner (wallet) as described
in Onboarding.


SEPA Operations

Simulate SEPA Deposit

Simulate an incoming SEPA EUR deposit to a user's account.

Endpoint

POST /bank/sepa/deposit

Request

{
  "region": "GB",
  "email": "[email protected]",
  "amount": 250.00
}
FieldTypeRequiredDescription
regionstringNoRegion code (GB or EEA). Always use GB for now.
emailstringYesUser's email address
amountnumberYesAmount in EUR

Response

{
  "success": true
}

This triggers a /v2/webhooks/activities webhook with type Sepa and direction Inbound.


Get Pending SEPA Transfers

List pending outbound SEPA transfers waiting for completion.

Note: In sandbox environment, all outbound SEPA transfers remain in pending state indefinitely. Use complete or revert endpoints to simulate the external banking system processing the transfer.

Endpoint

GET /bank/sepa/transfers/pending

Query Parameters

ParameterTypeRequiredDescription
regionstringNoRegion code (GB or EEA). Always use GB for now.
emailstringYesUser's email address

Response

[
  {
    "id": "txn_abc123def456",
    "transactionId": "OP-12345",
    "status": "RELEASED",
    "type": "PAYOUT",
    "amount": {
      "currency": "EUR",
      "value": 150.00
    }
  }
]

Use the id value, not transactionId, in transfer completion, cancel and revert requests. A payout is listed only
once the user's SEPA account has received at least one deposit.


Complete SEPA Transfer

Mark a pending outbound SEPA transfer as completed.

Endpoint

POST /bank/sepa/transfer/complete

Request

{
  "region": "GB",
  "email": "[email protected]",
  "transactionId": "txn_abc123def456"
}
FieldTypeRequiredDescription
regionstringNoRegion code (GB or EEA). Always use GB for now.
emailstringYesUser's email address
transactionIdstringYesTransaction ID from pending list

Response

{
  "success": true
}

This triggers a /v2/webhooks/activities webhook with status Completed.


Cancel SEPA Transfer

Cancel a pending outbound SEPA transfer. The payout ends Failed and the debit is refunded.

Endpoint

POST /bank/sepa/transfer/cancel

The request body is the same as for Complete SEPA Transfer.


Revert SEPA Transfer

Simulate a returned SEPA transfer. This can only be called after a transfer has been completed. Creates an inbound reversal transaction that credits the funds back to the user's account.

Endpoint

POST /bank/sepa/transfer/revert

Request

{
  "region": "GB",
  "email": "[email protected]",
  "transactionId": "txn_abc123def456"
}

Response

{
  "success": true
}

This triggers a /v2/webhooks/activities webhook with type Sepa, direction Inbound, representing the reversal credit.


ACH Operations

Activate ACH Customer

Activate a user's ACH account. Required before ACH deposits can be simulated.

Note: In sandbox environment, ACH accounts remain in pending state indefinitely after creation. Call this endpoint to simulate the external ACH provider activating the account.

Endpoint

POST /bank/ach/customer/activate

Request

{
  "email": "[email protected]"
}
FieldTypeRequiredDescription
emailstringYesUser's email address

Response

{
  "success": true
}

Simulate ACH Deposit

Simulate an incoming ACH USD deposit to a user's account.

Endpoint

POST /bank/ach/deposit

Request

{
  "email": "[email protected]",
  "amount": 500.00
}
FieldTypeRequiredDescription
emailstringYesUser's email address
amountnumberYesAmount in USD

Response

{
  "success": true
}

This triggers a /v2/webhooks/activities webhook with type AchPush and direction Inbound.


Simulate Fedwire and FedNow Deposits

Simulate an incoming wire or FedNow credit to the user's USD account. Both take the same body as
Simulate ACH Deposit and need an Active ACH account.

POST /bank/fedwire/deposit
POST /bank/fednow/deposit
{
  "email": "[email protected]",
  "amount": 500.00
}

The user is credited the same amount in WUSD, and the feed shows an Inbound activity of type Fedwire
or FedNow that reaches Completed / credit_done.


Complete ACH Transfer

Mark a pending outbound ACH transfer as completed.

Note: In sandbox environment, ach corridor payouts end Failed by themselves within minutes and the debit is
refunded; they never reach the bank simulator, so complete and revert answer No transfer found.
Use the fedwire corridor to test settlement: complete and revert settle a fedwire payout with its
transfer_id as externalId.

No transfer found right after initiate is a timing error. The payout reaches the simulator a few
seconds after its activity reads Pending / awaiting_payment. Retry for up to a minute.

Endpoint

POST /bank/ach/transfer/complete

Request

{
  "externalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
FieldTypeRequiredDescription
externalIdstringYesActivity ID from Wirex BaaS transfer response

Response

{
  "success": true
}

Revert ACH Transfer

Simulate a returned ACH transfer. This can only be called after a transfer has been completed. Creates an inbound reversal transaction that credits the funds back to the user's account.

Endpoint

POST /bank/ach/transfer/revert

Request

{
  "externalId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Response

{
  "success": true
}

Card Transaction Operations

Simulate card transactions for testing card payment flows. Each endpoint runs a complete ISO-8583 message flow (authorization, clearing, reversal, refund, etc.) against a card and triggers the corresponding activity webhooks.

Single-Message Simulators

The simplest way to create a card transaction. The body is { "cardId", "amount" }; the amount is in GBP.

EndpointSimulates
POST /card/transaction/posIn-store purchase
POST /card/transaction/eposCard-not-present purchase
POST /card/transaction/atmATM cash withdrawal
POST /card/transaction/creditOriginal Credit (funds pushed to the card)

The response carries success and the ISO 8583 responseCode. A decline is still 200: an amount the wallet
cannot cover answers "success": false, "responseCode": "51".

Common Parameters

All card flow endpoints accept the same base request format:

{
  "cardId": "550e8400-e29b-41d4-a716-446655440000",
  "amount": 25.50,
  "currency": "GBP",
  "settlementAmount": 25.50,
  "settlementCurrency": "GBP",
  "merchantCountry": "GBR",
  "paymentProvider": "Visa"
}
FieldTypeRequiredDescription
cardIdstring (UUID)YesCard ID from Wirex BaaS
amountnumberYesTransaction amount
currencystringYesTransaction currency (ISO 4217, e.g. GBP)
settlementAmountnumberYesSettlement (billing) amount
settlementCurrencystringYesSettlement currency (ISO 4217)
merchantCountrystringNoMerchant country (ISO 3166 alpha-3, e.g. GBR)
paymentProviderstringNoVisa, MasterCard, or VisaEFunds

For a same-currency purchase, set settlementAmount/settlementCurrency equal to amount/currency. To simulate FX, use different values.

POST /card/auth-and-multi-clearing additionally requires clearingAmounts (array of numbers) — the per-clearing local amounts whose sum equals the auth amount. Other flows that need an extra amount (reversalAmount, refundAmount, clearingAmount, secondAuthAmount, adjustmentAmount) answer 400 {"error": "<field> is required"} without it.

Every flow answers 200; the decision is in the body. A declined authorization carries auth.response.responseCode: "51" and the flow stops.

Common Response

Each flow returns the ISO messages it produced. Fields are present only when the flow generates them.

{
  "transactionIdentifier": "a1b2c3d4-0000-0000-0000-000000000000",
  "auth": { },
  "clearing": { },
  "refund": { },
  "reversal": { },
  "representment": { },
  "adjustment": { },
  "auths": [ ],
  "clearings": [ ]
}
FieldTypeDescription
transactionIdentifierstringIdentifier linking the messages in this flow
authobjectAuthorization message (when produced)
clearingobjectClearing/settlement message (when produced)
refundobjectRefund message (when produced)
reversalobjectReversal message (when produced)
representmentobjectRepresentment message (when produced)
adjustmentobjectAdjustment message (when produced)
authsarrayMultiple authorizations (multi-auth flows)
clearingsarrayMultiple clearings (multi-clearing flows)

Common Flows

PurposeEndpoint
In-store purchase (auth + clearing)POST /card/auth-and-clearing
E-commerce / card-not-present purchasePOST /card/epos-auth-and-clearing
ATM cash withdrawalPOST /card/atm-auth-and-clearing
Standalone refundPOST /card/standalone-refund
Push funds to card (Original Credit)POST /card/original-credit
Balance inquiryPOST /card/balance-inquiry

Example — Purchase (auth + clearing)

POST /card/auth-and-clearing

Request:

{
  "cardId": "550e8400-e29b-41d4-a716-446655440000",
  "amount": 25.50,
  "currency": "GBP",
  "settlementAmount": 25.50,
  "settlementCurrency": "GBP",
  "merchantCountry": "GBR",
  "paymentProvider": "Visa"
}

Response:

{
  "transactionIdentifier": "a1b2c3d4-0000-0000-0000-000000000000",
  "auth": { },
  "clearing": { }
}

This triggers /v2/webhooks/activities webhooks with type CardTransaction.


All Flow Endpoints

EndpointDescription
POST /card/auth-and-clearingAuthorization + clearing (standard purchase)
POST /card/epos-auth-and-clearingE-commerce (card-not-present) auth + clearing
POST /card/atm-auth-and-clearingATM auth + clearing
POST /card/fuel-dispenser-auth-and-clearingFuel dispenser (full reversal + delayed auth) + clearing
POST /card/multi-auth-and-clearingMultiple authorizations + clearing
POST /card/auth-and-multi-clearingOne auth + multiple partial clearings (clearingAmounts)
POST /card/auth-partial-reversalAuth + partial reversal
POST /card/auth-full-reversalAuth + full reversal
POST /card/auth-reversal-clearingAuth + reversal + clearing
POST /card/standalone-reversalStandalone reversal
POST /card/standalone-clearingStandalone clearing
POST /card/standalone-refundStandalone refund
POST /card/original-creditOriginal Credit Transaction (push funds to card)
POST /card/auth-clearing-full-refundAuth + clearing + full refund
POST /card/auth-clearing-partial-refundAuth + clearing + partial refund
POST /card/check-refundCheck refund
POST /card/auth-clearing-refund-representmentAuth + clearing + refund + representment
POST /card/auth-clearing-partial-refund-representmentAuth + clearing + partial refund + representment
POST /card/auth-clearing-full-reversal-representmentAuth + clearing + full reversal + representment
POST /card/auth-clearing-partial-reversal-representmentAuth + clearing + partial reversal + representment
POST /card/auth-chargeback-clearingAuth + chargeback advice + clearing
POST /card/auth-clearing-with-correctionAuth + clearing with correction
POST /card/credit-adjustmentCredit adjustment
POST /card/debit-adjustmentDebit adjustment
POST /card/balance-inquiryBalance inquiry

3DS Challenge Simulation

No card transaction simulation raises a 3DS challenge — POST /card/transaction/epos and the /card/*
flow endpoints above authorize and clear, but never produce a pending 3DS request. Use
POST /card/3ds/initiate to raise a standalone in-app confirmation challenge on a card, then approve or
decline it through the Wirex BaaS API exactly as in production. See
3DS Authentication for the approve/decline endpoints.

Initiate 3DS Challenge

Endpoint

POST /card/3ds/initiate

Request

{
  "cardId": "64120850-73a1-4df5-a074-d463258c9deb",
  "transactionCurrency": "USD"
}
FieldTypeRequiredDescription
cardIdstring (UUID)YesCard ID from Wirex BaaS — the id returned by card issuance
transactionCurrencystringNoChallenge currency, ISO 4217 alphabetic code (e.g. USD, EUR). Defaults to USD

Response

{
  "bin": "442601",
  "transactionId": "14be186b-872c-41f4-9e5b-c1dc226e78a0",
  "currency": "USD"
}
FieldTypeDescription
transactionIdstring (UUID)Challenge identifier. Appears as transaction_id in GET /api/v1/cards/3ds/requests and is the {transactionId} path parameter of the approve/decline endpoints
currencystringChallenge currency, ISO 4217 alphabetic code
binstringFirst 6 digits of the card number

The amount and merchant are generated by the simulator and are not in this response. Read them from the
pending request in GET /api/v1/cards/3ds/requests.

Test Flow

  1. Call POST /card/3ds/initiate with the card ID. Save transactionId.
  2. Call GET /api/v1/cards/3ds/requests with the card owner's token. The challenge is listed with
    transaction_id equal to the saved transactionId and the card's card_last_4. In sandbox it is listed immediately after step 1 returns.
  3. Call POST /api/v1/cards/3ds/requests/{transactionId}/approve or .../decline with an empty body.
    Returns 200 with {} and the challenge leaves the pending list.

A second approve or decline on the same transaction_id returns 400:

{
  "error_reason": "ErrorNotFound",
  "error_description": "No active 3DS request for this transaction",
  "error_category": {
    "category": "CategoryValidationFailure",
    "http_status_code": 400
  },
  "error_details": [
    { "key": "field", "details": "transaction_id" },
    { "key": "issue", "details": "not_found" }
  ]
}

An undecided challenge expires 5 minutes after it is created and drops out of the pending list, same
as in production.

Errors

HTTP StatusBodyCauseResolution
400{"error": "cardId is required"}cardId missing from the bodySend the card ID
500{"error": "3DS initiation failed: ..."}The card ID is not a Wirex BaaS card in sandboxUse the id returned by card issuance

Code Examples

JavaScript

const HELPER_API = 'https://ramc.wirexapp.tech';

// Simulate SEPA deposit
async function simulateSepaDeposit(email, amount) {
  const response = await fetch(`${HELPER_API}/bank/sepa/deposit`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      region: 'GB',
      email,
      amount
    })
  });
  return response.json();
}

// Complete SEPA transfer
async function completeSepaTransfer(email, transactionId) {
  const response = await fetch(`${HELPER_API}/bank/sepa/transfer/complete`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      region: 'GB',
      email,
      transactionId
    })
  });
  return response.json();
}

// Raise a 3DS challenge; approve it via GET/POST /api/v1/cards/3ds/requests
async function initiate3dsChallenge(cardId, transactionCurrency = 'USD') {
  const response = await fetch(`${HELPER_API}/card/3ds/initiate`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ cardId, transactionCurrency })
  });
  return response.json(); // { transactionId, currency, bin }
}

// Simulate card purchase (auth + clearing)
async function simulateCardPurchase(cardId, amount, currency = 'GBP') {
  const response = await fetch(`${HELPER_API}/card/auth-and-clearing`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      cardId,
      amount,
      currency,
      settlementAmount: amount,
      settlementCurrency: currency,
      paymentProvider: 'Visa'
    })
  });
  return response.json();
}

Python

import requests

HELPER_API = 'https://ramc.wirexapp.tech'

def simulate_sepa_deposit(email: str, amount: float) -> dict:
    response = requests.post(
        f'{HELPER_API}/bank/sepa/deposit',
        json={
            'region': 'GB',
            'email': email,
            'amount': amount
        }
    )
    return response.json()

def complete_sepa_transfer(email: str, transaction_id: str) -> dict:
    response = requests.post(
        f'{HELPER_API}/bank/sepa/transfer/complete',
        json={
            'region': 'GB',
            'email': email,
            'transactionId': transaction_id
        }
    )
    return response.json()

def initiate_3ds_challenge(card_id: str, transaction_currency: str = 'USD') -> dict:
    response = requests.post(
        f'{HELPER_API}/card/3ds/initiate',
        json={
            'cardId': card_id,
            'transactionCurrency': transaction_currency
        }
    )
    return response.json()  # transactionId, currency, bin

def simulate_card_purchase(card_id: str, amount: float, currency: str = 'GBP') -> dict:
    response = requests.post(
        f'{HELPER_API}/card/auth-and-clearing',
        json={
            'cardId': card_id,
            'amount': amount,
            'currency': currency,
            'settlementAmount': amount,
            'settlementCurrency': currency,
            'paymentProvider': 'Visa'
        }
    )
    return response.json()

Go

package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

const helperAPI = "https://ramc.wirexapp.tech"

type SepaDepositRequest struct {
    Region string  `json:"region"`
    Email  string  `json:"email"`
    Amount float64 `json:"amount"`
}

type CardTransactionRequest struct {
    CardID             string  `json:"cardId"`
    Amount             float64 `json:"amount"`
    Currency           string  `json:"currency"`
    SettlementAmount   float64 `json:"settlementAmount"`
    SettlementCurrency string  `json:"settlementCurrency"`
    PaymentProvider    string  `json:"paymentProvider"`
}

type ThreeDsInitiateRequest struct {
    CardID              string `json:"cardId"`
    TransactionCurrency string `json:"transactionCurrency,omitempty"`
}

type ThreeDsChallenge struct {
    TransactionID string `json:"transactionId"`
    Currency      string `json:"currency"`
    Bin           string `json:"bin"`
}

func simulateSepaDeposit(email string, amount float64) error {
    body, _ := json.Marshal(SepaDepositRequest{
        Region: "GB",
        Email:  email,
        Amount: amount,
    })

    _, err := http.Post(
        helperAPI+"/bank/sepa/deposit",
        "application/json",
        bytes.NewBuffer(body),
    )
    return err
}

func initiate3dsChallenge(cardID string, transactionCurrency string) (ThreeDsChallenge, error) {
    body, _ := json.Marshal(ThreeDsInitiateRequest{
        CardID:              cardID,
        TransactionCurrency: transactionCurrency,
    })

    var challenge ThreeDsChallenge
    resp, err := http.Post(
        helperAPI+"/card/3ds/initiate",
        "application/json",
        bytes.NewBuffer(body),
    )
    if err != nil {
        return challenge, err
    }
    defer resp.Body.Close()
    err = json.NewDecoder(resp.Body).Decode(&challenge)
    return challenge, err
}

func simulateCardPurchase(cardID string, amount float64, currency string) error {
    body, _ := json.Marshal(CardTransactionRequest{
        CardID:             cardID,
        Amount:             amount,
        Currency:           currency,
        SettlementAmount:   amount,
        SettlementCurrency: currency,
        PaymentProvider:    "Visa",
    })

    _, err := http.Post(
        helperAPI+"/card/auth-and-clearing",
        "application/json",
        bytes.NewBuffer(body),
    )
    return err
}

Error Handling

All endpoints return errors in this format:

{
  "error": "User not found for email: [email protected]"
}
HTTP StatusDescription
400Missing required parameters
500Operation failed (user not found, API error, etc.)

Did this page help you?