Download Statement as PDF
Generates and returns a transaction statement as a downloadable PDF. Use this endpoint when you need to display or save the statement in your application rather than emailing it to the cardholder.
How It Works
- Provide the same request parameters as the email statement API
- The system generates the PDF statement synchronously
- The PDF content is returned as a base64-encoded string in the response
- Decode the base64 string to get the PDF file
Key Business Rules
- Same date range restrictions as the email statement API (max 1 year)
- The response contains the PDF as a base64-encoded string
- Large date ranges with many transactions may take longer to process
- Consider implementing pagination for transaction history if you need to display transactions in your UI (use the Transaction History API instead)
Authorization
bearerAuth tenantId JWT Bearer token obtained from the Authentication API. Include in the
Authorization header as: Bearer <your-token>
In: header
Your unique tenant identifier assigned during onboarding
In: header
Header Parameters
Your unique tenant identifier assigned during partner onboarding.
Request Body
application/json
Statement generation request with cardholder identity and date range
Cardholder's registered mobile number. Optional but recommended for additional identity validation. If provided, it must match the mobile on file for the entity ID.
Kit number (card identifier) of the cardholder. The kit number is printed on the physical card and assigned during issuance. Optional — used for additional validation.
Required. Unique entity identifier for the cardholder. This is the primary identifier used to look up the customer's account and transaction history. Received in the issuance response or customer fetch API.
1 <= lengthStart date (inclusive) for the statement period.
Format: dd-mm-yyyy (e.g., 01-04-2025 for April 1, 2025).
Must be earlier than or equal to toDate.
^\d{2}-\d{2}-\d{4}$End date (inclusive) for the statement period.
Format: dd-mm-yyyy (e.g., 30-04-2025 for April 30, 2025).
Must be later than or equal to fromDate. Maximum gap from fromDate: 365 days.
^\d{2}-\d{2}-\d{4}$Optional wallet/account ID to filter the statement to a specific wallet. If not provided, the statement includes transactions across all wallets. Useful for multi-currency cards where you want a statement for a specific currency wallet.
Set to true to include offline (pending settlement) transactions in the statement.
Offline transactions are those authorized but not yet settled. Default: false.
falseSet to true to include only successful transactions. Set to false to include
all transactions including failed/declined ones. Default: includes all transactions.
Response Body
application/json
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/transactions/statement/download" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "entityId": "798782647420001622070825", "fromDate": "01-04-2025", "toDate": "30-04-2025" }'The result field contains base64-encoded PDF content
{
"result": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZwo... (base64-encoded PDF)",
"pagination": null
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Bad Request",
"status": 400,
"detail": "entityId: must not be empty",
"message": "error.http.400"
}{
"type": "https://www.m2pfintech.com/problem/problem-with-message",
"title": "Customer does not exist for id: 79878264742000162207082",
"status": 409,
"detail": "Customer does not exist for id: 79878264742000162207082",
"message": "error.business",
"businessCode": "PPCUST_002"
}Debit & Close Forex Card POST
Debits the **entire balance** from a forex card wallet and closes the account. This is a terminal operation — the wallet cannot be reused after closure. ### When to Use - Trip is complete and customer wants to encash all remaining forex - Card surrender / account closure process - Expired card balance pullback ### Behavior 1. The full balance is debited from the specified wallet 2. The wallet status is changed to CLOSED 3. Funds are credited to the customer's bank account (via funding source details) 4. If this is the last active wallet, the card may also be closed
Email Statement to Cardholder POST
Generates a PDF transaction statement for the specified date range and sends it to the cardholder's registered email address. The email is sent asynchronously — the API returns a success response immediately, and the email is delivered within a few minutes. ### How It Works 1. Provide the cardholder's entity ID (and optionally mobile/kit number for additional validation) 2. Specify the date range for the statement (`fromDate` to `toDate`) 3. The system generates a formatted PDF with all transactions in the period 4. The PDF is emailed to the cardholder's registered email address ### Key Business Rules - The cardholder must have a registered email address on file - Maximum date range: 1 year (365 days) - The statement includes all transaction types: loads, purchases, refunds, fees, etc. - If no transactions exist in the date range, a statement with zero transactions is sent - Email delivery is asynchronous — use webhooks or polling to confirm delivery if needed
