Payment Cancellation (Cancel)
11.1 Payment Cancel
Definition
Cancellation is used for transactions that are still under provision (not captured or on the same day).
Endpoint: POST /b2c/payment/cancel
Base URL: https://pgw.netahsilatdemo.com
Header
| Area | Type | Mandatory | Description |
|---|---|---|---|
| Authorization | string | ✔ | Bearer {AccessToken} |
Request Body
| Area | Type | Mandatory | Description |
|---|---|---|---|
| referenceCode | string | ✔ | Merchant reference code for the transaction (clientReferenceCode) |
| reason | string | ✔ | Reason for cancellation |
Request Example
{
"referenceCode": "8893cec8-51df-40bc-b7e3-cc06fd1a48b6",
"reason": "customer_request"
}
Response
| Area | Type | Description |
|---|---|---|
| success | boolean | Transaction result |
| error | string | Error message |
| lastAmount | decimal | Remaining amount after transaction |
Response Example
{
"error": null,
"success": true,
"lastAmount": 0.00
}
Business Rules
- Canceled transaction cannot be processed again
- After cancellation:
- becomes
lastAmount = 0 - Multiple cancellation requests should not be sent for the same transaction (idempotency is recommended)