Fetch FX Rates
Fetches the exchange rate between a source currency and destination currency. Use this to display rates to the customer before loading the forex card.
Rate Types
| Type | Description |
|---|---|
IBR | Interbank Rate |
CARD | Card rate (product-configured) |
MID | Mid-market rate |
Response
Returns buyRate (rate at which platform buys foreign currency) and
sellRate (rate at which platform sells to customer).
Authorization
bearerAuth tenantId JWT Bearer token from the Authentication API
In: header
Your unique tenant identifier assigned during onboarding
In: header
Header Parameters
Your unique tenant identifier
Request Body
application/json
Required. Business/tenant corporate ID
Required. ISO numeric currency code of source
Required. ISO numeric currency code of destination
Required. Rate type
"IBR" | "CARD" | "MID" | "CRD"Response Body
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v1/forex/issuance/fetch-fx-rate" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "business": "devfxinrks2dw9v95f", "sourceCurrencyCode": "752", "destinationCurrencyCode": "124", "exchangeRateType": "CARD" }'{
"result": {
"sourceCurrency": "SEK",
"destinationCurrency": "CAD",
"sourceCurrencyCode": "752",
"destinationCurrencyCode": "124",
"sellRate": 48.62,
"buyRate": 42.97,
"type": "CARD"
},
"pagination": null
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Failed to fetch conversation rate",
"status": 409,
"detail": "Failed to fetch conversation rate",
"message": "error.business",
"businessCode": "PP_CORP_117"
}Fetch Multi FX Rates POST
Retrieves conversion rates for multiple wallet currencies in a single call. Use this when loading a forex card with multiple currencies (e.g., USD + EUR + GBP) to get all rates at once. ### Request - Provide a list of wallet names in `walletList` - Specify `amount` for rate calculation - Use `fundMode` to indicate LOAD, RELOAD, or REFUND ### Response Returns an array of conversion rate objects, one per wallet currency.
Fetch All Forex Card Holder Loads GET
Retrieves a paginated list of all forex card holder load transactions. Results include both credit (load) and debit (withdrawal) operations.
