Close transaction

Base URL: https://checkout-sandbox.payway.com.kh/Copy to clipboard
POST

If your business handles transactions that may require cancellation—such as flash sales, hotel bookings, or ticket sales—you can use the Close Transaction API to cancel a transaction before payment completes. Once a transaction is closed, it will no longer accept payment: any incoming payment will be rejected or reversed, and no payment notification (callback) will be sent to the merchant.

Request

Header Params
stringrequired

Example: application/json

Body Params application/json

stringrequired

Request date and time in UTC format as YYYYMMDDHHmmss.

stringrequired

A unique merchant key which provided by ABA Bank.

<= 20 characters
stringrequired

Original purchase transaction id that you want to close/cancel.

<= 20 characters
stringrequired

A Base64-encoded HMAC SHA-512 hash generated by concatenating req_time, merchant_id, and tran_id , encrypted using your public_key.

PHP Sample Code

// public key provided by ABA Bank
$api_key = "API KEY PROVIDED BY ABA BANK";
// Prepare the data to be hashed
$b4hash = $req_time . $merchant_id . $tran_id;
// Generate the HMAC hash using SHA-512 and encode it in Base64
$hash = base64_encode(hash_hmac('sha512', $b4hash, $api_key, true));

Example

{
  "req_time": "",
  "merchant_id": "",
  "tran_id": "",
  "hash": ""
}
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R

Responses