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

Complete pre-auth transactions

POST
/api/merchant-portal/merchant-access/online-transaction/pre-auth-completion
A complete pre-auth refers to the action where the merchant proceeds with capturing the funds after the initial authorization, typically at the time the product or service is provided.
This process involves two steps:
Pre-authorization: The merchant requests a certain amount to be reserved on the customer’s account, usually to confirm the customer has sufficient funds or credit.
Completion (or Capture): The merchant later captures the pre-authorized amount, finalizing the transaction and actually charging the customer's account.
Conditions
You can only complete the pre-auth once.
Pre-auth cannot be completed on transactions that have already expired or been canceled.
For card payments, you can complete the pre-auth with an additional 10% above the original pre-auth amount.

Request

Header Params

Body Params application/json

Example
{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "b1453eac8cd686f90542c9d7dc026a3f70678afd",
    "hash": "wR2bVPVKY9M4WmeGoQUUcmtrJYFofFuMrgTMBLj/g8kPfXgnpK/qpjptO+1D0nKbpFktqM/iPWEyQ6/llsnJ bw=="
}

Request 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-completion' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "b1453eac8cd686f90542c9d7dc026a3f70678afd",
    "hash": "wR2bVPVKY9M4WmeGoQUUcmtrJYFofFuMrgTMBLj/g8kPfXgnpK/qpjptO+1D0nKbpFktqM/iPWEyQ6/llsnJ bw=="
}'

Responses

🟢200OK
application/json
Body

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