Developer Suite
Register Sandbox
Register Sandbox
  1. Credentials on File
  • 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
    • Payment
      POST
    • Renew Token
      POST
    • Get token details
      POST
    • Remove token
      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. Credentials on File

Payment

POST
/api/payment-gateway/v3/purchase/payment-credential
This API allow you to initiate purchase using token.

Request

Header Params

Body Params application/json

Example
{
    "purchase_type": "purchase",
    "amount": 0.02,
    "ctid": "SIDARA",
    "return_params": "eyJBdXRvbWF0aW9uX3JldHVybnBhcmFtIjoiU0lEQVJBIEtIUVIifQ==",
    "custom_fields": "eyJpZF9jYXJ0IjoyMzkxNzMzOSwiQ09NUEFOWSI6IkFVVE9NQVRFUiJ9",
    "payment_option": "abapay",
    "return_deeplink": "IHsiYW5kcm9pZF9zY2hlbWUiOiJ0aWt0b2s6Ly8iLCJpb3Nfc2NoZW1lIjoidGlrdG9rOi8vIn0=",
    "payout": "",
    "last_name": "Bora",
    "tran_id": "5399119569",
    "merchant_id": "automate_online",
    "pwt": "6451397B0BC9B09CADBDA8DA17EC11BB87B46185F657272245F8727CC5EA8936C94E807",
    "request_time": "20250725103323",
    "token_flag": "CITU_FLEX",
    "phone": "010417430",
    "currency": "USD",
    "items": "W3sibmFtZSI6IkFuZ2tvciBQdXJvIiwicXVhbnRpdHkiOjMsInByaWNlIjoxMDAuMDF9XQ==",
    "first_name": "Thol",
    "hash": "2QSqdjva5Q+kzPpsKKp2bNCpWeVmUebpLnBjFlYEFoi5gs9vdPUs79FWe9/MnmWNdNQvjrT6aaoUhSJzmikmzQ==",
    "email": "Thol.unreal@ababank.com"
}

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/payment-gateway/v3/purchase/payment-credential' \
--header 'Content-Type: application/json' \
--data-raw '{
    "purchase_type": "purchase",
    "amount": 0.02,
    "ctid": "SIDARA",
    "return_params": "eyJBdXRvbWF0aW9uX3JldHVybnBhcmFtIjoiU0lEQVJBIEtIUVIifQ==",
    "custom_fields": "eyJpZF9jYXJ0IjoyMzkxNzMzOSwiQ09NUEFOWSI6IkFVVE9NQVRFUiJ9",
    "payment_option": "abapay",
    "return_deeplink": "IHsiYW5kcm9pZF9zY2hlbWUiOiJ0aWt0b2s6Ly8iLCJpb3Nfc2NoZW1lIjoidGlrdG9rOi8vIn0=",
    "payout": "",
    "last_name": "Bora",
    "tran_id": "5399119569",
    "merchant_id": "automate_online",
    "pwt": "6451397B0BC9B09CADBDA8DA17EC11BB87B46185F657272245F8727CC5EA8936C94E807",
    "request_time": "20250725103323",
    "token_flag": "CITU_FLEX",
    "phone": "010417430",
    "currency": "USD",
    "items": "W3sibmFtZSI6IkFuZ2tvciBQdXJvIiwicXVhbnRpdHkiOjMsInByaWNlIjoxMDAuMDF9XQ==",
    "first_name": "Thol",
    "hash": "2QSqdjva5Q+kzPpsKKp2bNCpWeVmUebpLnBjFlYEFoi5gs9vdPUs79FWe9/MnmWNdNQvjrT6aaoUhSJzmikmzQ==",
    "email": "Thol.unreal@ababank.com"
}'

Responses

🟢200OK
application/json
Body

Example
{
    "status": {
        "code": "00",
        "message": "Success.",
        "trace_id": "d79f472376737a997f6ea66d0d8eb045"
    }
}
🟠400Bad Request
🟠403Forbidden
Previous
Link Card
Next
Renew Token