Fetch Forex Transactions V2 (Cursor-Based Pagination)
Retrieves forex card transaction history including AuthNT failure transactions using
cursor-based pagination. Unlike the V1 endpoint (/v1/transactions/fetch/forexAll)
which uses pageNo/pageSize offset pagination, this endpoint returns a toDate cursor
timestamp that must be passed in the next request's toDate filter to continue fetching
older transactions.
Key Differences from V1 (/v1/transactions/fetch/forexAll)
| Feature | V1 | V2 |
|---|---|---|
| Pagination | Offset (pageNo + pageSize) | Cursor (toDate in response → next request's toDate filter) |
| AuthNT failures | No | Yes — merged into ledger results |
| Response wrapper | M2PResponse with result + pagination | Flat transactions, toDate, currentSize |
| Page size control | Request body pageSize | pageSize query parameter (default: 10) |
Cursor Pagination Flow
- Send first request without a
toDatefilter (or with your desiredfromDate). - The response contains
toDate— the timestamp of the last transaction in this batch. - Pass this
toDatevalue as thetoDatefilter in your next request to fetch the preceding page. - Repeat until
currentSizeis 0 or fewer thanpageSize(no more transactions).
AuthNT Failure Merging
This endpoint also fetches failed authorization (AuthNT) transactions and merges them with ledger results. Failures not already present in the ledger are appended to give a complete view of all attempted transactions, including declined ones.
Authorization
bearerAuth tenantId JWT Bearer token from the Authentication API
In: header
Your unique tenant identifier assigned during onboarding
In: header
Query Parameters
Number of transactions per page. Use toDate from the previous response to fetch the next page.
10Request Body
application/json
Required. Cardholder's entity identifier
1 <= lengthFilter by mobile number (optional)
Filter by card kit number (optional)
Start date (inclusive). Format: dd-mm-yyyy
End date (inclusive). Format: dd-mm-yyyy
Filter by specific wallet/account ID (optional)
Set to true to return only successful transactions
Set to true to include offline transactions
Note: serialized as isDataMart in JSON due to boolean getter naming convention.
Optional list of additional filter criteria
Optional list of transaction type strings to filter on
Response Body
application/json
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v2/transactions/fetch" \ -H "Content-Type: application/json" \ -d '{ "entityId": "476843769320000001160925" }'{
"transactions": [
{
"parentTxn": {
"amount": "-500.00",
"transactionType": "ECOM",
"transactionStatus": "SUCCESS",
"exchangeRate": 83.5,
"transactionCurrencyCode": "840",
"transactionCurrencyCodeName": "USD"
},
"childTxnCount": 1,
"childTxns": [
{
"amount": "-500.00",
"transactionType": "ECOM",
"transactionStatus": "SUCCESS"
}
]
},
{
"parentTxn": {
"amount": "-200.00",
"transactionType": "ATM",
"transactionStatus": "FAILURE"
},
"childTxnCount": 0,
"childTxns": []
}
],
"toDate": "2025-04-15T10:25:00.000Z",
"currentSize": 2
}{
"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": "Customer does not exist",
"status": 409,
"detail": "Customer does not exists for id",
"message": "error.business",
"businessCode": "PPCUST_002"
}Fetch All Forex Transactions POST
Retrieves transaction history specifically for forex cards. The response includes a **parent-child transaction structure** where: - **Parent transaction**: The original card-level transaction (e.g., POS purchase in SGD) - **Child transactions**: Wallet-level breakdowns showing which currency wallets were debited and the exchange rates applied ### When to Use - Display forex transaction history with currency conversion details - Show customers how multi-currency transactions were split across wallets - Reconciliation for forex card operations ### Response Fields Key fields in each transaction: - `transactionCurrencyCode` / `transactionCurrencyCodeName`: Currency of the original transaction - `baseCurrencyCode` / `baseCurrencyCodeName`: Base currency (typically USD) - `exchangeRate`, `markupRate`, `markupServiceTax`: Currency conversion details - `preBalance` / `postBalance`: Wallet balance before/after (in child transactions) - `forexWallet`: Which forex wallet was used
Fetch Load Details by ID GET
Retrieves a specific pool load transaction by its ID. Use this to check the status of a pool load request (CREATED → APPROVED → SUCCESS/FAILED).
