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
  • Create Binding
  • Example Request

Was this helpful?

  1. PAYON API Reference

Create Binding

Create Binding API method is used to create a binding without payment. It deactivates other bindings for the same merchant, clientId, and PAN.

Environment

URL

TEST

PRODUCTION

Create Binding

POST {{URL}}/pg/binding/register

This endpoint allows you to register card binding without payment.

Headers

Name
Type
Description

Authentication

string

Authentication token to track down who is emptying our stocks.

Request Body

Name
Type
Description

merchantId*

string

Merchant's Identification

termId*

string

Terminal's Identification

clientId*

string

Customer's Identification

paymentMethod*

string

Payment Method( PAYON, CREDIT_DEBIT)

wdlAcNo*

string

Card Number

wdlCvv

string

wdlExpiry

string

Card expiration date(year and moth) in the following format: YYYYMM.

wdlNm

string

Name of the cardholder

payonPin

string

PAYON's PIN. It's required when using PAYON's payment method.

phone

string

Phone must be valid, It will use for verification for create binding in PAYON PG's system.

pin

string

User passcode to identify before do any transaction in PAYON PG's System.

email

string

Email

{
    "txDt": null,
    "txSeqNo": null,
    "merchantId": "C0000143",
    "termId": "CT03000003",
    "wdlAcNo": "520473**1003",
    "wdlExpiry": "202512",
    "wdlNm": null,
    "clientId": "C0000143CT0300000302",
    "phone": null,
    "email": null,
    "bindingId": "7ce4dda7-b9f8-4343-883b-e5ff6295e5f9",
    "resultCode": "0000",
    "resultMsg": "Success"
}

Example Request

curl --location --request POST 'http://pgtest.payon.com.kh/pg/createBinding' \
--data-raw '{
    "merchantId":"C0000143",
    "termId":"CT03000003",
    "clientId":"02",
    "wdlAcNo":"5204730000001003",
    "wdlCvv":"100",
    "wdlExpiry":"202512",
    "wdlNm":"MC",
    "phone":"855964444781",
    "email":"",
    "pin":"123456"

}'

POST /pg/createBinding HTTP/1.1
Host: pgtest.payon.com.kh
Content-Length: 242

{
    "merchantId":"C0000143",
    "termId":"CT03000003",
    "clientId":"02",
    "wdlAcNo":"5204730000001003",
    "wdlCvv":"100",
    "wdlExpiry":"202512",
    "wdlNm":"MC",
    "phone":"855964444781",
    "email":"",
    "pin":"123456"

}

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('http://pgtest.payon.com.kh/pg/createBinding');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setBody('{\n    "merchantId":"C0000143",\n    "termId":"CT03000003",\n    "clientId":"02",\n    "wdlAcNo":"5204730000001003",\n    "wdlCvv":"100",\n    "wdlExpiry":"202512",\n    "wdlNm":"MC",\n    "phone":"855964444781",\n    "email":"",\n    "pin":"123456"\n\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/createBinding',
  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 =>'{
    "merchantId":"C0000143",
    "termId":"CT03000003",
    "clientId":"02",
    "wdlAcNo":"5204730000001003",
    "wdlCvv":"100",
    "wdlExpiry":"202512",
    "wdlNm":"MC",
    "phone":"855964444781",
    "email":"",
    "pin":"123456"

}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

var settings = {
  "url": "http://pgtest.payon.com.kh/pg/createBinding",
  "method": "POST",
  "timeout": 0,
  "data": "{\n    \"merchantId\":\"C0000143\",\n    \"termId\":\"CT03000003\",\n    \"clientId\":\"02\",\n    \"wdlAcNo\":\"5204730000001003\",\n    \"wdlCvv\":\"100\",\n    \"wdlExpiry\":\"202512\",\n    \"wdlNm\":\"MC\",\n    \"phone\":\"855964444781\",\n    \"email\":\"\",\n    \"pin\":\"123456\"\n\n}",
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

var data = "{\n    \"merchantId\":\"C0000143\",\n    \"termId\":\"CT03000003\",\n    \"txId\":\"1614595772233350\",\n    \"amount\":\"1\"\n\n\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/payonApp/payment");

xhr.send(data);

PreviousPush Back NotificationNextGet Binding List

Last updated 3 years ago

Was this helpful?

http://pgtest.payon.com.kh
https://pg.payon.com.kh