Developer Suite
Register Sandbox
Register Sandbox
  1. Ecommerce Checkout
  • 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
  • Plugins
    • Shopify
    • Prestashop
    • Woocommerce
  • Credentials on File
    • Unschedule Payment
    • Schedule Payment
    • Link Account
      POST
    • Link Card
      POST
    • Payment
      POST
    • Renew Token
      POST
    • Get token details
      POST
    • Remove token
      POST
    • Subscription
      POST
  • ABA QR API
    • QR API
      POST
  • Payment Link
    • Create payment link
      POST
    • Get payment link details
      POST
  • Pre-auth
    • Complete pre-auth transactions
    • Complete pre-auh transaction with payout
    • Cancel pre-purchase transaction
  • Payout
    • Payout
    • Update a beneficiary status
    • Add a beneficiary to whitelist
  • KHQR Guideline
    • Get transactions
  • Resources
  1. Ecommerce Checkout

Close transaction

POST
api/payment-gateway/v1/payments/close-transaction
If your business involves transactions that may need cancellation—such as flash sales, hotel bookings, or ticket sales—you can use the Close Transaction API to cancel a transaction. Once a transaction is closed, its payment status is updated to CANCELLED. This means the payment will either be rejected or reversed, and no payment notification (callback) will be sent to the merchant.

Request

Header Params

Body Params application/json

Example
{
    "req_time": "20241022053608",
    "merchant_id": "lavacafe",
    "tran_id": "1729573626",
    "hash": "ln9Td4JiGPc...R6y2tmUoF2NERNaQ=="
}

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 'https://checkout-sandbox.payway.com.kh/api/payment-gateway/v1/payments/close-transaction' \
--header 'Content-Type: application/json' \
--data '{
    "req_time": "20241022053608",
    "merchant_id": "lavacafe",
    "tran_id": "1729573626",
    "hash": "ln9Td4JiGPc...R6y2tmUoF2NERNaQ=="
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Examples
{
    "status": {
        "code": "00",
        "message": "Success!",
        "tran_id": "1729573626"
    }
}
Previous
Get a transaction details
Next
Check transaction