m2pfintech
API LibraryTransaction

Fetch Transaction History

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.

POST
/v1/transactions/fetch-all

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

Query Parameters

pageNo?integer

Page number (0-indexed)

Default0
pageSize?integer

Number of records per page

Default10

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Request Body

application/json

entityId*string

Required. Cardholder's entity identifier

Length1 <= length
mobile?

Filter by mobile number (optional)

kit?string

Filter by card kit number (optional)

fromDate?string

Start date (inclusive). Format: dd-mm-yyyy

toDate?string

End date (inclusive). Format: dd-mm-yyyy

accountId?string

Filter by specific wallet/account ID (optional)

success?boolean

Set to true to return only successful transactions

isOffline?boolean

Set to true to include offline transactions

dataMart?boolean

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/transactions/fetch-all" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "entityId": "476843769320000001160925",    "fromDate": "01-04-2025",    "toDate": "30-04-2025"  }'
{
  "result": [
    {
      "amount": "-500.00",
      "preBalance": "8500.00",
      "postBalance": "8000.00",
      "transactionType": "POS",
      "txnOrigin": "POS",
      "transactionStatus": "SUCCESS",
      "transactionAmount": "500.00",
      "time": "2025-04-15T10:30:00.000Z",
      "merchantName": "Flipkart Online",
      "merchantLocation": "Bangalore IN",
      "merchantId": "FLIP001",
      "mcc": "5411",
      "externalTransactionId": "TXN20250415103000001",
      "retrievalReferenceNo": "337786787811",
      "kitNo": "320000001",
      "transactionCurrencyCode": "356",
      "transactionCurrencyCodeName": "INR",
      "crDr": "D"
    },
    {
      "amount": "10000.00",
      "preBalance": "0.00",
      "postBalance": "10000.00",
      "transactionType": "CREDIT",
      "txnOrigin": "LOAD",
      "transactionStatus": "SUCCESS",
      "transactionAmount": "10000.00",
      "time": "2025-04-01T09:00:00.000Z",
      "description": "Initial card load",
      "externalTransactionId": "LOAD20250401090000001",
      "kitNo": "320000001",
      "transactionCurrencyCode": "356",
      "transactionCurrencyCodeName": "INR",
      "crDr": "C"
    }
  ],
  "pagination": {
    "list": true,
    "pageSize": 10,
    "pageNo": 0,
    "totalPages": 1,
    "totalElements": 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 exists for id :476843769320000001160925",
  "status": 409,
  "detail": "Customer does not exists for id :476843769320000001160925",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}