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

Purchase

POST
api/payment-gateway/v1/payments/purchase
The Purchase API is used to initiate a payment transaction between a customer and a merchant through PayWay. It allows merchants to request a payment by providing transaction details such as the amount, currency, item list, and other relevant data.
Once the API is called, the customer is redirected to PayWay’s hosted checkout page, bottom sheet, or modal popup—depending on your integration option—where they can complete the payment using the available methods (e.g., card, ABA PAY, KHQR, digital wallets). After the transaction is completed, PayWay will return the transaction result to the merchant via the configured return URL or callback.

Request

Header Params

Body Params multipart/form-data

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/purchase' \
--form 'req_time=""' \
--form 'merchant_id=""' \
--form 'tran_id=""' \
--form 'firstname=""' \
--form 'lastname=""' \
--form 'email=""' \
--form 'phone=""' \
--form 'type=""' \
--form 'payment_option=""' \
--form 'items=""' \
--form 'shipping=""' \
--form 'amount=""' \
--form 'currency=""' \
--form 'return_url=""' \
--form 'cancel_url=""' \
--form 'skip_success_page=""' \
--form 'continue_success_url=""' \
--form 'return_deeplink=""' \
--form 'custom_fields=""' \
--form 'return_params=""' \
--form 'view_type=""' \
--form 'payment_gate=""' \
--form 'payout=""' \
--form 'additional_params=""' \
--form 'lifetime=""' \
--form 'google_pay_token=""' \
--form 'hash=""'

Responses

🟢200Success
text/html
Examples
<!DOCTYPE html>
<html data-capo="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalab
<title>PayWay - Checkout</title>
...
</head>
<body>
...
</body>
</html>
🟢200OK
🟢200Exception
Previous
Ecommerce Checkout
Next
Get a transaction details