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
  • 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. Ecommerce Checkout

Refund API

POST
/api/merchant-portal/merchant-access/online-transaction/refund
You can use the Refund API to issue full or partial refunds within 30 days after the transaction was created. ABA PAY and KHQR refunds are immediate, while Card, WeChat, and Alipay refunds follow your agreement with PayWay. This API works both for instore transaction and online transaction.
Eligible Transactions: Only transactions with a status of COMPLETED can be refunded.
Time Frame: Refunds must be requested within 30 days of the payment created date.
Pending Settlements: Refunds can be issued even if the settlement is still pending (Alipay, WeChat, Card).
Partial Refunds: Multiple partial refunds can be issued until the total amount paid is refunded.
Rate limit: Request limit 500 reqeusts/second

Request

Header Params

Body Params application/json

Example
{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "884113079983a...2c3e460be35f2a3",
    "hash": "3nd/2Z4g45...wnA2WA/M/Qg=="
}

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/refund' \
--header 'Content-Type: application/json' \
--data-raw '{
    "request_time": "20200728093403",
    "merchant_id": "ec000002",
    "merchant_auth": "884113079983a...2c3e460be35f2a3",
    "hash": "3nd/2Z4g45...wnA2WA/M/Qg=="
}'

Responses

🟢200OK
application/json
Body

Examples
{
    "grand_total": 1.5,
    "total_refunded": 0.09,
    "currency": "USD",
    "transaction_status": "REFUNDED",
    "status": {
        "code": "00",
        "message": "Success!"
    }
}
Previous
Check transaction
Next
Get transaction list