Fetch Multi FX Rates
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
amountfor rate calculation - Use
fundModeto indicate LOAD, RELOAD, or REFUND
Response
Returns an array of conversion rate objects, one per wallet currency.
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. Product ID
Required. Primary wallet name
List of wallet currencies for rate fetch
Required. Business/corporate ID
Corporate ID (if applicable)
Required. Amount for rate calculation
Required. Funding mode
"LOAD" | "RELOAD" | "Refund"Required. BUY or SELL
"BUY" | "SELL"Required. Discount rate (0.05 = 5%)
Exchange rate source
"IBR" | "CARD" | "MID" | "CRD"Response Body
application/json
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v1/forex/issuance/conversion-rate-wallets" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "business": "devfxinrks2dw9v95f", "product": "uZwuh50VfL", "walletName": "USD", "walletList": [ "USD", "EUR" ], "rateSubType": "BUY", "discountRate": 0, "amount": 1, "fundMode": "LOAD", "exchangeRateType": "CARD" }'{
"result": [
{
"buyingCurrency": "INR",
"sellingCurrency": "USD",
"buyingCurrencyCode": 356,
"sellingCurrencyCode": 840,
"baseCurrency": "USD",
"buyingAmount": 40.6,
"convertedAmount": 40.6,
"conversionRate": 40.6,
"sellingAmount": 1,
"rateSubType": "BUY"
},
{
"buyingCurrency": "INR",
"sellingCurrency": "EUR",
"buyingCurrencyCode": 356,
"sellingCurrencyCode": 978,
"baseCurrency": "USD",
"buyingAmount": 98.93,
"convertedAmount": 98.93,
"conversionRate": 98.93,
"sellingAmount": 1,
"rateSubType": "BUY"
}
],
"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": "Failed to fetch conversation rate",
"status": 409,
"detail": "Failed to fetch conversation rate",
"message": "error.business",
"businessCode": "PP_CORP_117"
}Calculate Forex Fee Summary POST
Calculates and returns a detailed fee breakdown for forex card operations. Use this API to preview all applicable fees, taxes, and the total payable amount **before** initiating an issuance, load, or reload transaction. ### How It Works 1. Specify which fee types to include (issuance, load, reload, etc.) using boolean flags 2. Provide the hierarchy ID (your corporate/branch identifier) and product details 3. The API calculates all applicable fees based on your configured fee structure 4. Returns a comprehensive breakdown including net value, fees, taxes, TCS, and total amount ### Key Business Rules - Fee structures are configured per hierarchy (corporate/branch level) - Product type and load amount affect the fee calculation - Promotional codes can modify fee structures if configured - Fee waiver flag allows authorized users to waive fees for specific transactions - Conversion GST is calculated on the forex markup and returned separately ### Common Use Cases | Scenario | Flags to Set | |----------|-------------| | New card issuance with initial load | `issuanceFeeApplied=true`, `loadFeeApplied=true`, `conversionGstApplied=true` | | Subsequent reload | `reLoadFeeApplied=true`, `conversionGstApplied=true` | | Card replacement | `cardReplacementFeeApplied=true` | | Card closure with pullback | `cardClosureFeeApplied=true`, `pullbackFeeApplied=true` |
Fetch FX Rates POST
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).
