Void Transaction
To make a void for a SETTLED trasnaction use payment public ID from Payment Platform in the request.
caution
Void is only applicable on transactions performed on the same day before 9:00 PM (UTC+3). No Void request will be accepted between 9:00 PM and 12:00 AM (UTC+3) regardless of response received.
The Void request is allowed for the payments in SETTLED status only.
API Endpoint
Request URL: {{CHECKOUT_HOST}}/api/v1/payment/void
Request Method: POST
Request Body: JSON
Request Parameters
| Parameter | Type | Mandatory, Limitations | Description |
|---|---|---|---|
merchant_key | String | Required | Key for Merchant identification Example: xxxxx-xxxxx-xxxxx |
payment_id | String | Required Up to 255 characters | Transaction ID (public) Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002 |
hash | String | Required | Special signature to validate your request to Payment Platform. For details, click here |
Response Parameters
| Parameter | Type | Mandatory, Limitations | Description |
|---|---|---|---|
status | String | Required | Payment status Example: VOID / SETTLED |
payment_id | String | Required Up to 255 characters | Transaction ID (public) Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002 |
date | String | Required Format: YYYY-MM-DD hh:mm:ss | Transaction date Example: 2020-08-05 07:41:10 |
reason | String | Optional | Decline or error reason (for "sale", "void "and "refund" operation types). It displays only if the transaction has FAIL status Example: The operation was rejected. Please contact the site support |
| order | Object | ||
number | String | Required | Order ID Example: order-1234 |
amount | String | Required | Product price Example: 0.19 |
currency | String | Required Up to 3 characters | Currency Example: QAR |
description | String | Required Up to 1024 characters | Product name Example: Very important gift |
Examples
Request
curl --location -g --request POST '{{CHECKOUT_HOST}}/api/v1/payment/void' \
--data-raw \
'{
"merchant_key":"xxxxx-xxxxx-xxxxx",
"payment_id":"63c781cc-de3d-11eb-a1f1-0242ac130006",
"hash":"{{operation_hash}}"
}'
Response
Void Successful
{
"status": "SUCCESS",
"payment_status": "void",
"payment_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"date": "2020-08-05 07:41:10",
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "QAR",
"description": "very important gift"
}
}
Void Failed
{
"status": "FAIL",
"payment_status": "settled",
"payment_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"date": "2020-08-05 07:41:10",
"reason": "Declined by processing",
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "QAR",
"description": "very important gift"
}
}