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

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

Responses

🟢200OK
application/json
Bodyapplication/json

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