4. Optional - Cancel Transaction

This page describes the Cancel Transaction API call.

Overview

In some cases merchants need to cancel a transaction with Hoox. For example., if a buyer cancelled his purchase. This can be done using Hoox platform or using this API call.

The response object contains a transactionCancelationId that should be kept for future inquiries.

When Should You Send This Call

This API call can be sent whenever is most suitable for the merchants, and should not influence business flow. card was charged successfully.

Cancel a transaction.

post

Report the cancelation of a completed transaction to Hoox.

Body

Payload to send in the cancel transaction request body.

merchantIdstring · stringRequired

The merchant ID provided by Hoox.

Example: mid@FdnU121922
branchIdstring · stringRequired

The branch ID provided by Hoox.

Example: is@FdnU121311
apiKeystringRequired

The API Key provided by Hoox.

Example: bc@ut654!
keyPolicystringRequired

The Key Policy key provided by Hoox.

Example: hkp254768901
transactionConfirmationIdstringRequired

The transaction confirmation id recieved in the Transaction response.

Example: trid12Abs
Responses
200
Transaction Cancelled.
application/json
post
POST /cancelTransaction HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "merchantId": "mid@FdnU121922",
  "branchId": "is@FdnU121311",
  "apiKey": "bc@ut654!",
  "keyPolicy": "hkp254768901",
  "transactionConfirmationId": "trid12Abs"
}
{
  "transactionCancelationId": "123e4567-e89b-12d3-a456-426614174000",
  "cancelled": true,
  "message": "OK"
}

Merchants must send the hooxValidationId or the requestId in the request payload.

Last updated