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

Check transaction

POST
/api/payment-gateway/v1/payments/check-transaction-2
This API allow you to get the transaction status of a transaction, you can only check the transaction that created within 7 days only. To get a details of a transaction which is older than 7 days please use Get a transaction details API.
💡
Request limit 600 reqeusts/second

Request

Header Params
Content-Type
string 
required
Example:
application/json
Body Params application/json
req_time
string 
required
Request date and time in UTC format as YYYYMMDDHHmmss.
merchant_id
string 
required
A unique merchant key which provided by ABA Bank.
tran_id
string 
required
Your purchase transaction id.
hash
string 
required
Base64 encode of hash hmac sha512 encryption of concatenates values merchant_id, and tran_id with public_key.
PHP Sample Code
Example
{
    "req_time": "20250213065545",
    "merchant_id": "ec000002",
    "tran_id": "17394277693",
    "hash": "4slqXzgVig09Hf...2vgALgdENA=="
}

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/v1/payments/check-transaction-2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "req_time": "20250213065545",
    "merchant_id": "ec000002",
    "tran_id": "17394277693",
    "hash": "4slqXzgVig09Hf...2vgALgdENA=="
}'

Responses

🟢200OK
application/json
Body
data
object 
optional
payment_status_code
integer 
optional
Transaction status code:
0 : APPROVED, PRE-AUTH
2 : PENDING
3 : DECLINDED
4 : REFUNDED
7 : CANCELLED
total_amount
number 
optional
Amount that customer suppose to pay after discount.
original_amount
number 
optional
Original purchase amount
refund_amount
number 
optional
Total of all refunded amount.
discount_amount
number 
optional
Discounted amount and its currency follow the original transaction currency.
payment_amount
number 
optional
The amount that customer has paid.
payment_currency
string 
optional
The payment currency that the customer has paid.
apv
string 
optional
Transaction approval code
payment_status
string 
optional
Possible values:
APPROVED : Transaction successfully completed with the full purchase amount.
PRE-AUTH : Transaction successfully processed with a pre-authorization hold on funds pending final capture.
REFUNDED : Transaction has been fully or partially refunded.
PENDING : Transaction is awaiting payment completion by the payer.
DECLINED : Transaction has been declined.
CANCELLED : Merchant canceled the pre-authorization or closed the transaction.
transaction_date
string 
optional
Date and time of the transaction created in payment gateway.
status
object 
optional
Examples
{
    "data": {
        "payment_status_code": 0,
        "total_amount": 0.1,
        "original_amount": 0.1,
        "refund_amount": 0,
        "discount_amount": 0,
        "payment_amount": 0.1,
        "payment_currency": "USD",
        "apv": "753786",
        "payment_status": "APPROVED",
        "transaction_date": "2025-02-13 13:55:25"
    },
    "status": {
        "code": "00",
        "message": "Success!",
        "tran_id": "17394277693"
    }
}
Previous
Close transaction
Next
Refund API