Get foreign exchange rate for currency conversion
Retrieve the current foreign exchange rate for converting between two currencies. The response includes the base exchange rate, applied markup percentage, effective rate after markup, and a validity window for the quoted rate.
The rate quote is time-limited. Use it within the validTill timestamp to ensure the quoted rate is honored. After expiry, request a fresh rate.
Common use cases include displaying conversion rates to customers before international transactions, calculating forex charges, and pre-authorization amount estimation.
Authorization
BearerAuth TenantHeader JWT Bearer token obtained from the /auth/login endpoint
In: header
Tenant identifier provided by M2P (e.g. ENBDTABBY)
In: header
Request Body
application/json
Source currency code in ISO 4217 format
Target currency code in ISO 4217 format
Amount in source currency to convert. Must be greater than zero.
double0.01 <= valueResponse Body
application/json
application/json
application/json
curl -X POST "https://api.m2p.com/Yappay/forex-manager/getRate" \ -H "Content-Type: application/json" \ -d '{ "fromCurrency": "INR", "toCurrency": "USD", "amount": 10000 }'{
"status": "success",
"data": {
"fromCurrency": "INR",
"toCurrency": "USD",
"exchangeRate": 0.01198,
"fromAmount": 10000,
"toAmount": 119.8,
"markup": 2.5,
"effectiveRate": 0.01168,
"validTill": "2026-03-06T10:35:00Z"
}
}{
"result": null,
"exception": {
"detailMessage": "Unsupported currency pair INR to XYZ",
"shortMessage": "Unsupported currency pair",
"errorCode": "FX_001",
"languageCode": "en"
},
"pagination": null
}{
"result": null,
"exception": {
"detailMessage": "Exchange rate feed is temporarily unavailable",
"shortMessage": "Rate feed unavailable",
"errorCode": "FX_004",
"languageCode": "en"
},
"pagination": null
}Update customer details POST
Update an existing customer profile. Only the fields provided in the request body will be updated. All other fields remain unchanged. The entityId field is the only mandatory field for identifying the customer. Important - Do not use this API to modify KYC details. This API is intended for updating contact information such as email, phone number, address, and name fields. The profileId field can optionally be used to update the fee or limit profile associated with the customer card.
Send a notification to a customer POST
Send a notification to a customer through one of the supported channels - SMS, EMAIL, or PUSH notification. The templateId identifies a pre-configured notification template. The params object provides dynamic values to be substituted into the template placeholders. Templates and their available parameters are configured by M2P during onboarding. Contact M2P to get the list of available template IDs and their required parameters.
