m2pfintech
API LibraryTransaction

Forex Wallet-to-Wallet Transfer

Transfers funds between two forex wallets on the same card. For example, converting USD to SGD or EUR to GBP.

How It Works

  1. Specify source and target wallet names
  2. Amount is debited from the source wallet
  3. Converted amount is credited to the target wallet
  4. Exchange rate is applied based on the current interbank rate (IBR)

Rate Types

TypeDescription
IBRInterbank Rate — standard market rate
CRDCard Rate — rate configured for the product

Response Structure

Returns a detailed breakdown:

  • source: Debit details with pre/post balance
  • destination: Credit details with pre/post balance
  • conversionInfo: Exchange rate, markup, fees, gross amount
POST
/v2/customers/forex/transfer

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Request Body

application/json

kitNo*string

Required. Card kit number

Length1 <= length
amount*number

Required. Amount to transfer from source wallet

Range0 <= value
sourceWalletName*string

Required. Source wallet currency name

Length1 <= length
targetWalletName*string

Required. Target wallet currency name

Length1 <= length
rateType?string

Exchange rate type: IBR = Interbank Rate, CRD = Card Rate

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v2/customers/forex/transfer" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "kitNo": "20006085",    "amount": 25,    "sourceWalletName": "USD",    "targetWalletName": "SGD",    "rateType": "IBR"  }'
{
  "result": {
    "txnId": "6226188908925145002086051761654802652",
    "entityId": "615928984620006085281025",
    "kitNo": "20006085",
    "txnOrigin": "WEB",
    "source": {
      "amount": "-25.0",
      "preBalance": "500.0",
      "postBalance": "475.0",
      "transactionType": "W2W_FOREX_DEBIT",
      "transactionStatus": "SUCCESS",
      "externalTransactionId": "6226188908925145002086051761654802652_DEBIT",
      "transactionCurrencyCodeName": "USD",
      "crDr": "D"
    },
    "destination": {
      "amount": "32.98",
      "preBalance": "0",
      "postBalance": "32.98",
      "transactionType": "W2W_FOREX_CREDIT",
      "transactionStatus": "SUCCESS",
      "externalTransactionId": "6226188908925145002086051761654802652_CREDIT",
      "transactionCurrencyCodeName": "SGD",
      "exchangeRate": 1.319385,
      "crDr": "C"
    },
    "conversionInfo": {
      "conversionRate": 1.319385,
      "convertedAmount": 32.98,
      "markUpAmount": 0,
      "markUpServiceTax": 0,
      "txnFees": 0,
      "serviceTax": 0,
      "grossConvertedAmount": 32.98
    }
  },
  "pagination": null
}
{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Bad Request",
  "status": 400,
  "detail": "Unable to convert http message",
  "message": "error.http.400"
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Source Wallet does not exists for id :USD",
  "status": 409,
  "detail": "Source Wallet does not exists for id :USD",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}