m2pfintech
API LibraryTransaction

Fetch Load Details by ID

Retrieves a specific pool load transaction by its ID. Use this to check the status of a pool load request (CREATED → APPROVED → SUCCESS/FAILED).

GET
/v1/load/{id}

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

Path Parameters

id*string

Pool Load Transaction ID

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Response Body

application/json

application/json

curl -X GET "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/load/LD20260101001" \  -H "X-TENANT-ID: ACME_CORP"
{
  "result": {},
  "pagination": {
    "list": true,
    "pageSize": 0,
    "pageNo": 0,
    "totalPages": 0,
    "totalElements": 0
  }
}
{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Load transaction not found",
  "status": 409,
  "detail": "Load transaction with ID LD20260101001 does not exist",
  "message": "error.business",
  "businessCode": "PP_CORP_002"
}

Fetch Forex Transactions V2 (Cursor-Based Pagination) POST

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 1. Send first request without a `toDate` filter (or with your desired `fromDate`). 2. The response contains `toDate` — the timestamp of the last transaction in this batch. 3. Pass this `toDate` value as the `toDate` filter in your next request to fetch the preceding page. 4. Repeat until `currentSize` is 0 or fewer than `pageSize` (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.

Fetch Transaction History POST

Retrieves transaction history for a cardholder filtered by entity ID, date range, mobile number, or kit number. Supports pagination. ### When to Use - Display transaction history in your app or portal - Reconciliation and settlement reporting - Customer support — look up recent transactions ### Filters - **entityId** (required): Cardholder's entity identifier - **fromDate / toDate**: Date range filter (format: dd-mm-yyyy) - **kit**: Filter by specific card kit number - **mobile**: Filter by mobile number - **accountId**: Filter by specific wallet/account - **success**: Set to `true` to return only successful transactions - **isOffline**: Set to `true` to include offline transactions ### Response Structure Returns a paginated list of transactions with details including amount, type, merchant info, pre/post balance, exchange rates, and status.