Developer Suite
Register Sandbox
Register Sandbox
  1. Payout
  • 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
      POST
    • Update a beneficiary status
      POST
    • Add a beneficiary to whitelist
      POST
  • KHQR Guideline
  • Resources
  1. Payout

Payout

POST
/api/payment-gateway/v2/direct-payment/merchant/payout
The ABA PayWay Funds Route API provides a seamless solution for splitting and distributing payments to third parties, sellers, service providers, or your ABA bank accounts.

Request

Header Params
Content-Type
string 
required
Example:
application/json
Body Params application/json
merchant_id
string 
required
A unique merchant key which provided by ABA Bank.
<= 255 characters
tran_id
string 
required
Unique transaction id
<= 20 characters
beneficiaries
string 
required
Payout instruction contains information of the beneficiary.
PHP Sample Code
<= 1000 characters
amount
number <float>
required
Total payout amount (sum of all beneficiary amount).
KHR : The amount must be greater than or equal to 100KHR
USD : The amount must be greater than or equal to 0.01USD
currency
string 
required
Transaction currency. Either KHR or USD.
>= 3 characters<= 3 characters
custom_fields
string 
optional
An additional field information as JSON string. This information will be associate with the payment transaction.
PHP Sample Code
<= 255 characters
hash
string 
required
Base64 encode of hash hmac sha512 encryption of concatenates values merchant_id, tran_id, beneficiaries, amount, custom_fields and currency with public_key.
Here is an example code in PHP
<= 512 characters
Example
{
    "merchant_id": "EC0001",
    "tran_id": "A17259584044451",
    "beneficiaries": "ElKjECTZK7ym...NX0Dt2dz...",
    "amount": 3.44,
    "currency": "USD",
    "custom_fields": "{\"timestamp\":\"2024-08-23 10:35:55.437\",\"traceId\":\"63f9645fa3bd8678907ed4c038357385\"}",
    "hash": "3c70c551a...d1092f6e22228a7686c51bc1162a..."
}

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 '/api/payment-gateway/v2/direct-payment/merchant/payout' \
--header 'Content-Type: application/json' \
--data-raw '{
    "merchant_id": "EC0001",
    "tran_id": "A17259584044451",
    "beneficiaries": "ElKjECTZK7ym...NX0Dt2dz...",
    "amount": 3.44,
    "currency": "USD",
    "custom_fields": "{\"timestamp\":\"2024-08-23 10:35:55.437\",\"traceId\":\"63f9645fa3bd8678907ed4c038357385\"}",
    "hash": "3c70c551a...d1092f6e22228a7686c51bc1162a..."
}'

Responses

🟢200OK
application/json
Body
transaction_id
string 
optional
Unique transaction id pass from merchant
transaction_date
string 
optional
The approved date and time of the transaction
external_reference
string 
optional
This is a unique reference booking entry number from core banking system.
apv
string 
optional
A random 6 digit number generated by payment gateway.
transaction_amount
number <double>
optional
Total transaction amount
transaction_currency
string 
optional
Transaction currencies
beneficiaries
array [object {5}] 
optional
Array of beneficiary
payout_id
string 
optional
A unique id generated by payment gateway.
name
string 
optional
Beneficiary name
mid_acccount
string 
optional
Indentifier of the beneficiary, it can be either MID represent a merchant or ABA account #.
amount
number <double>
optional
Payout amount
currency
string 
optional
Payout currency. Follow the transaction currency
status
object 
optional
code
string 
optional
0 : Success
4 : Duplicated Transaction ID
11 : Something went wrong. Try again or contact the merchant for help
24 : Can not decrypt data
25 : Allow maximum 10 beneficiaries per requests
26 : Invalid Merchant Profile
36 : Payout account or amount is invalid
44 : Purchase amount has reached transaction limit
48 : Something went wrong with requested parameters. Please try again or contact the merchant for help
70 : Total purchase amount has reached daily limit. Please use difference account
79 : Payment Rejected!
81 : The total amount must be greater than 0. Please double check and try again.
82 : Invalid transaction currency. We only support USD or KHR. Please double check and try again.
83 : Transaction is duplicated.
84 : Unable to access the merchant's account details. Please verify that your settlement account is still active.
85 : Transaction currency does not match the merchant's currency. Please review your details.
86 : Unable to debit the merchant's account.
87 : Unable to retrieve the beneficiary's account details.
88 : Unable to retrieve the beneficiary's MID details.
89 : Unable to retrieve the beneficiary's account details.
90 : The currencies for the merchant and beneficiary do not align. Please review your details.
91 : Unable to credit the beneficiary's account.
92 : The total payout amount does not match the total transaction amount. Please review your details.
93 : Insufficient balance.
400 : Bad request
message
string 
optional
The message that associate with the code. Please above code for the details.
tran_id
string 
optional
Unique transaction id pass from merchant
trace_id
string 
optional
A unique id generated by payment gateway, we can use this number to trace issue when there is an error.
Examples
{
    "transaction_id": "172595840773178",
    "transaction_date": "2024-09-10T15:53:27.2157019+07:00",
    "external_reference": "100FT30147412155",
    "apv": "328097",
    "transaction_amount": 3.44,
    "transaction_currency": "USD",
    "beneficiaries": [
        {
            "payout_id": "172595842687056",
            "name": "",
            "mid_acccount": "200030000",
            "amount": 1.72,
            "currency": "USD"
        },
        {
            "payout_id": "172595842679750",
            "name": "",
            "mid_acccount": "012538302",
            "amount": 1.72,
            "currency": "USD"
        }
    ],
    "status": {
        "code": "0",
        "message": "Success!",
        "tran_id": "172595840773178",
        "trace_id": "e728bf3e95e32e3c97286fc9f8aef82d"
    }
}
Previous
Payout
Next
Update a beneficiary status