m2pfintech

Fetch Statement Data

Fetches detailed statement data for a customer for a given statement month or statement ID. Returns the full statement including transaction list, customer mapping details, loan details (if requested), and total outstanding amounts.

POST
/statement/customer/fetchStatementData

Query Parameters

loan_details?boolean

Whether to include loan details in the response

Defaultfalse

Header Parameters

TENANT*string

Tenant identifier

Content-Type*string

Content type of the request

Default"application/json"

Request Body

application/json

entityId*string

Entity ID of the customer; also accepted as 'entity_id'

stmtMonth?string

Statement month in MMYYYY format; also accepted as 'stmt_month'. Either stmtMonth or statementId must be provided.

Match^\d{6}$
statementId?string

Unique statement ID. Either stmtMonth or statementId must be provided.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.m2pfintech.com/statement/customer/fetchStatementData" \  -H "TENANT: string" \  -H "Content-Type: application/json" \  -H "Content-Type: application/json" \  -d '{    "entityId": "CUST20260617001",    "stmtMonth": "062026"  }'
{
  "result": {
    "transactionList": [
      {
        "transactionDate": "2026-06-15T10:00:00Z",
        "txnAmount": -3200,
        "crDr": "DR",
        "amount": 3200,
        "kitNo": "180010188",
        "txndescription": "Amazon Purchase",
        "txnOrigin": "ECOM",
        "extTxnId": "TXN20260615001",
        "accountingStatus": "POSTED"
      }
    ],
    "stmtCustomerMapping": {
      "lastStatementBalance": 10000,
      "currentStatementAmount": 13200,
      "totalCredit": 0,
      "totalDebit": 3200,
      "minDue": 1320,
      "statementDate": "2026-06-30T00:00:00Z",
      "customerDueDate": "2026-07-20T00:00:00Z"
    },
    "totalOutstandingAmount": {
      "TOTAL": 13200
    }
  },
  "exception": null,
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_400",
    "shortMessage": "Bad Request",
    "detailMessage": "Invalid or missing required fields in the request payload."
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_401",
    "shortMessage": "Unauthorized",
    "detailMessage": "Missing or invalid TENANT header."
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_500",
    "shortMessage": "Internal Server Error",
    "detailMessage": "An unexpected error occurred. Please try again later."
  },
  "pagination": null
}