Developer Suite
Register Sandbox
Register Sandbox
  1. Pre-auth
  • Overview
  • API Endpoints
  • Ecommerce Checkout
    • Purchase
      POST
    • Get a transaction details
      POST
    • Close transaction
      POST
    • Check transaction
      POST
    • Refund API
      POST
    • Get transaction list
      POST
    • Exchange rate
      POST
  • Checkout Plugins
    • Prestashop
    • Woocommerce
  • Credentials on File
    • Link Account
      POST
    • Link Card
      POST
    • Purchase using token
      POST
    • Remove account token
      POST
    • Remove card token
      POST
    • Get linked account details
      POST
  • ABA QR API
    • QR API
      POST
  • Payment Link
    • Create payment link
      POST
    • Get payment link details
      POST
  • Pre-auth
    • Complete pre-auth transactions
      POST
    • Complete pre-auh transaction with payout
      POST
    • Cancel pre-purchase transaction
      POST
  • Payout
    • Payout
    • Update a beneficiary status
    • Add a beneficiary to whitelist
  • KHQR Guideline
  • Resources
  1. Pre-auth

Cancel pre-purchase transaction

POST
/api/merchant-portal/merchant-access/online-transaction/pre-auth-cancellation
Cancel pre-auth (or cancel pre-authorization) is the process of releasing a temporary hold on funds placed on a customer's payment method before the final transaction is completed.
Important Notes:
You can only cancel a pre-authorization if the transaction is still pending; if the pre-auth has already been completed or previously cancelled, it cannot be cancelled again.
Each transaction’s pre-authorization can be cancelled only once.
Once the cancellation is successfully processed, the transaction status will update to "CANCELLED."
For ABA PAY and Card transactions, funds are instantly released back to the payer, whereas for KHQR transactions, the funds will be refunded to the payer.

Request

Header Params

Body Params application/json

Example
{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "b1453eac8cd686f...c026a3f70678afd",
    "hash": "wR2bVPV...Q6/llsnJ bw=="
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://checkout-sandbox.payway.com.kh//api/merchant-portal/merchant-access/online-transaction/pre-auth-cancellation' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "b1453eac8cd686f...c026a3f70678afd",
    "hash": "wR2bVPV...Q6/llsnJ bw=="
}'

Responses

🟢200OK
application/json
Body

Examples
{
    "grand_total": 1.5,
    "currency": "USD",
    "transaction_status": "CANCELLED",
    "status": {
        "code": "00",
        "message": "Success"
    }
}
Previous
Complete pre-auh transaction with payout
Next
Payout