Reverse a previous transaction
Reverse a previously completed transaction. Supports both full and partial reversals.
For a full reversal, omit the amount field or set it equal to the original transaction amount. For a partial reversal, provide the partial amount (must be less than the original). The partial reversal amount must not exceed the original transaction amount.
The originalTransactionId identifies which transaction to reverse. A transaction can only be reversed once for full reversals. Multiple partial reversals are allowed as long as the total does not exceed the original amount.
Authorization
BearerAuth TenantHeader JWT Bearer token obtained from the /auth/login endpoint
In: header
Tenant identifier provided by M2P (e.g. ENBDTABBY)
In: header
Request Body
application/json
Transaction ID of the original transaction to reverse
Amount to reverse. If omitted, the full original amount is reversed. For partial reversal, specify the partial amount (must not exceed original).
doubleReason for the reversal. Mandatory for audit purposes.
Response Body
application/json
application/json
curl -X POST "https://api.m2p.com/Yappay/transaction-manager/reverse" \ -H "Content-Type: application/json" \ -d '{ "originalTransactionId": "TXN20260306005678", "reason": "Customer dispute - item not received" }'{
"status": "success",
"data": {
"reversalTransactionId": "TXN20260306009999",
"originalTransactionId": "TXN20260306005678",
"reversedAmount": 1000,
"availableBalance": 18500
}
}{
"result": null,
"exception": {
"detailMessage": "Reversal not allowed for this transaction type",
"shortMessage": "Reversal not allowed",
"errorCode": "TXN_020",
"languageCode": "en"
},
"pagination": null
}Get transaction history for a card GET
Retrieve paginated transaction history for a specific card identified by kit number. Supports filtering by date range and transaction type. Results are paginated with a default page size of 20 and maximum of 100 records per page. Page numbering starts at 0. Each transaction record includes the transaction ID, external reference, type, amount, currency, balance after transaction, status, narration, and timestamp.
Get full customer details by entity ID GET
Retrieve comprehensive customer details including personal information, address, preferences, KYC documents, and associated card (kit) list by entity ID. The response includes a kitList array with each card's kitNo, status, cardType, and description. The primary card (first ALLOCATED card) is set as the top-level kitNo and cardType. Use the v1 variant (/v1/fetchEntityByEntityid/{entityId}) to receive address details in the preference object format instead of the flat addressDto format. When Click to Pay is enabled, use the CTP-specific fetchEntityDetails endpoint (/Yappay/click-to-pay/v1/fetch-entity-details) to retrieve CTP enrollment status per card.
