Skip to main content

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

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
payment_idStringRequired Up to 255 charactersTransaction ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
hashStringRequiredSpecial signature to validate your request to Payment Platform.
For details, click here

Response Parameters

ParameterTypeMandatory, LimitationsDescription
statusStringRequiredPayment status
Example: VOID / SETTLED
payment_idStringRequired Up to 255 charactersTransaction ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
dateStringRequired
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
reasonStringOptionalDecline 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
orderObject
numberStringRequiredOrder ID
Example: order-1234
amountStringRequiredProduct price
Example: 0.19
currencyStringRequired Up to 3 charactersCurrency
Example: QAR
descriptionStringRequired Up to 1024 charactersProduct 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"
}
}