PAYON Payment Gateway
  • Table of Contents
  • Revision History
  • How is Work
    • PAYON PG PAYMENT
      • PAYON's Wallet Payment via PAYON Mobile App
      • PAYON Payment via PAYON's Card
      • CREDIT/DEBIT Online Payment
      • PPCBank Mobile Pay via PPCBank Mobile App(Coming Soon)
      • KHQR Online Payment
      • Binding Payment via PAYON's Card
      • Binding Payment via Credit/Debit's Card
  • PayOn PG Overview
    • Desktop Views
      • PAYON Payment Method
        • PAYON Card Payment
        • PAYON QR Payment
      • Credit/Debit Payment
      • KHQR Payment
      • PPCBank Payment
    • Mobile Views
      • PAYON Payment Method
      • Credit/Debit Payment Method
      • KHQR Payment
        • Bakong APP
        • PPCBank App
        • Other Bank App
      • PPCBank Payment
    • Obtain your API Keys
    • Platform Application Settings
  • Work flows
    • Payment Request Workflow
    • Page Redirection Workflow
  • Getting Started
    • Generate Checkout Link
    • Try redirect to Checkout Link
    • Test your payment
    • Add Card(Create Binding)
  • PAYON API Reference
    • Payment Order Registration
    • Cancellation Payment
    • Pre Auth Completion Payment
    • Refunds Payment
    • Transaction Orders History
    • Get Transaction Status
    • Push Back Notification
    • Create Binding
    • Get Binding List
    • Create Binding PIN
    • Enable / Disable PIN
    • Merchant Reconciliation
  • TEST Cards and Accounts
    • Test Card&Account
  • PAYON Library
  • PayOn Library
    • How to use PayOn Library
    • How to encrypt data with RSA
  • PAYON APPS
    • Environments
  • 3RD PARTY APPS
    • PPCBANK Environment
    • Bakong Environment
Powered by GitBook
On this page
  • PG Transaction Orders History
  • Example Request

Was this helpful?

  1. PAYON API Reference

Transaction Orders History

All transaction orders have supports for bulk fetches view "list" API method. For instance, you can list of all orders.

PreviousRefunds PaymentNextGet Transaction Status

Last updated 3 years ago

Was this helpful?

In order to interact with PAYON's API. First you need to . Next generate for authorization between Merchant and PAYON's server.

Environment

URL

TEST

PRODUCTION

PG Transaction Orders History

POST {{URL}}/pg/orders

These list API share a common structure, taking at least these some parameters fromDate, ToDate, index, limit, merchantId, termId.

Request Body

Name
Type
Description

merchantId

string

Merchant Identification

termId

string

Merchant Terminal Identification

fromDate

string

date format ddmmyyy

toDate

string

date format ddmmyy

index

string

Starting index page

limit

string

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

[
    {
        "txDt": "20201124",
        "txSeqNo": "2020112400001250",
        "txStCd": "09",
        "trt": "10",
        "payDvCd": "8",
        "paymentType": "02",
        "merchantId": "C0000143",
        "termId": "CT03000003",
        "tracNo": "1606193062038",
        "amount": 1,
        "currencyCode": "USD",
        "settleYn": "N",
        "cancelYn": "N",
        "refundYn": "N",
        "apprNo": "190879",
        "apprDttm": "24/11/2020 11:47:01",
        "resultCd": "0000",
        "resultMsg": "Success",
        "stan": "001032"
    },
    {
        "txDt": "20201124",
        "txSeqNo": "2020112400001251",
        "txStCd": "09",
        "trt": "10",
        "payDvCd": "8",
        "paymentType": "02",
        "merchantId": "C0000143",
        "termId": "CT03000003",
        "tracNo": "1606199421698",
        "amount": 1,
        "currencyCode": "USD",
        "settleYn": "N",
        "cancelYn": "N",
        "refundYn": "N",
        "apprNo": "193202",
        "apprDttm": "24/11/2020 01:30:29",
        "resultCd": "0000",
        "resultMsg": "Success",
        "stan": "001033"
    }
]

Example Request

curl --location --request POST 'http://pgtest.payon.com.kh/pg/orders' \
--data-raw '{
    "fromDate":"01112018",
    "toDate":"24112020",
    "index":1,
    "limit":5,
    "trt":"10",
    "merchantId":"C0000143",
    "termId":"CT03000003"
}'
POST /pg/orders HTTP/1.1
Host: pgtest.payon.com.kh

{
    "fromDate":"01112018",
    "toDate":"24112020",
    "index":1,
    "limit":5,
    "trt":"10",
    "merchantId":"C0000143",
    "termId":"CT03000003"
}
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('http://pgtest.payon.com.kh/pg/orders');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Cookie' => 'SESSION=2e99ea42-84d2-4853-8c24-d5e541673468'
));
$request->setBody('{\n    "fromDate":"01112018",\n    "toDate":"24112020",\n    "index":1,\n    "limit":5,\n    "trt":"10",\n    "merchantId":"C0000143",\n    "termId":"CT03000003"\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://pgtest.payon.com.kh/pg/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"{\n    \"fromDate\":\"01112018\",\n    \"toDate\":\"24112020\",\n    \"index\":1,\n    \"limit\":5,\n    \"trt\":\"10\",\n    \"merchantId\":\"C0000143\",\n    \"termId\":\"CT03000003\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Cookie: SESSION=2e99ea42-84d2-4853-8c24-d5e541673468"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var settings = {
  "url": "http://pgtest.payon.com.kh/pg/orders",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Cookie": "SESSION=2e99ea42-84d2-4853-8c24-d5e541673468"
  },
  "data": "{\n    \"fromDate\":\"01112018\",\n    \"toDate\":\"24112020\",\n    \"index\":1,\n    \"limit\":5,\n    \"trt\":\"10\",\n    \"merchantId\":\"C0000143\",\n    \"termId\":\"CT03000003\"\n}",
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var data = "{\n    \"fromDate\":\"01112018\",\n    \"toDate\":\"24112020\",\n    \"index\":1,\n    \"limit\":5,\n    \"trt\":\"10\",\n    \"merchantId\":\"C0000143\",\n    \"termId\":\"CT03000003\"\n}";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://pgtest.payon.com.kh/pg/orders");
xhr.setRequestHeader("Cookie", "SESSION=2e99ea42-84d2-4853-8c24-d5e541673468");

xhr.send(data);

http://pgtest.payon.com.kh
https://pg.payon.com.kh
Obtain your API Key
API's signature