3. Message specification
@PayOn development group
Transmission/reception messages between the affiliated store and PayOn PG are delivered in a POST method using the HTTP(S) protocol.
- All messages used in request and response are composed of JSON String.
- The Key and Value values of the message are case sensitive.
- Value of all messages are entered as Strings.
- Date, time, and number are converted to String format.
3.1 PayOn web standard payment page by QR code
3.1.1 Web standard payment screen URL
Operation division | URL |
PayOn Online card payment screen (TEST) | http://116.212.147.141/OC/Payment.jsp |
PayOn Online card payment screen (REAL) | https://api.payon.com.kh/OC/Payment.jsp |
3.1.2 Transfer parameters
- The following message is configured as JSON String in the URL of the web standard payment screen and delivered in the GET method. - The data transmitted in the GET method is encoded using the encodeURIComponent() function provided in Javascript.
Key | Value | Necessary | Length |
PAYMENT_TYPE | Payment method classification 1. "OC" Fixed value setting (OC: Online Card) | Y | 2 |
API_MODE | API Operation method 1. "1" Fixed value setting (1: Affiliate web) | Y | 1 |
TEST_REAL | Separation of tests and actual transactions 1. "0": TEST deal, "1": REAL deal 2. Set to "0" during development and testing | Y | 1 |
TRT_TYPE | Classification of work 1. "10" Set a fixed value (10: Request payment approval) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
TX_ID | Merchant transaction identification number 1. Use unique values managed by the merchant such as order number | Y | Least 4 maximum 16 |
REQ_DATE | Payment request date and time 1. "DDMMYYYYhhmmss" Type in format | Y | 14 |
AMOUNT | Amount of payment 1. If the currency unit is USD dollar, enter it in cents (ex: 5 For 20 cents dollars 520) | Y | maximum 8 |
CURRENCY | Monetary unit 1. “D” fixed value (D: USD dollar) | Y | 1 |
CARD_NO | Card Number 1. Card number can be delivered if PayOn card number is managed in the affiliated store's internal system 2. Enter only numbers for card number 3. If the PayOn card number is set to “”, the customer directly enters the card number on the PayOn web standard payment screen. 4. QR code payment method does not use card number | Option | 16 |
3.2 PayOn web standard payment screen by card number and PIN
3.2.1 Web standard payment screen URL
Operation division | URL |
PayOn Online card payment screen (TEST) | http://116.212.147.141/PG/Payment.jsp |
PayOn Online card payment screen (REAL) | https://api.payon.com.kh/PG/Payment.jsp |
3.2.2 Transfer parameters
- The following message is configured as JSON String in the URL of the web standard payment screen and delivered in the GET method. - The data transmitted in the GET method is encoded using the encodeURIComponent() function provided in Javascript.
Key | Value | Necessary | Length |
PAYMENT_TYPE | Payment method classification 1. “OC” Fixed value setting (OC: Online Card) | Y | 2 |
API_VER | API Version 1. "1.0.0" Fixed value (Current version: 1.0.0) | Y | 5 |
API_MODE | API Operation method 1. "1" Fixed value setting (1: App) | Y | 1 |
TEST_REAL | Separation of tests and actual transactions 1. “0”: TEST deal , ”1”: REAL deal 2. Set to “0” during development and testing | Y | 1 |
TRT_TYPE | Classification of work 1. "12" Set a fixed value (12: App) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal given by PayOn | Y | 10 |
TX_ID | Merchant transaction identification number 1. Use unique values managed by the merchant, such as order number | Y | Least 4 maximum 16 |
REQ_DATE | Payment request date and time 1. "DDMMYYYYhhmmss" Type in format | Y | 14 |
AMOUNT | Amount of payment 1. If the currency unit is USD dollar, enter it in cents (ex: 5 For 20 cents dollars 520) | Y | maximum 8 |
CURRENCY | Monetary unit 1. "D" fixed value (D: USD dollar) | Y | 1 |
RETURN_URL | Redirect URL to show result | Y | |
MC_CALLCENTER | MERCHANT TEL No | Y |
3.3 View online card authorization results
3.3.1 URL
Operation division | URL |
TEST | |
REAL |
3.3.2 Approval result inquiry request message (Merchant -> PayOn)
Key | Value | Necessary | Length (Byte) |
PAYMENT_TYPE | Payment method classification - “OC” Fixed value setting (OC: Online Card) | Y | 2 |
API_MODE | API Operation method - “1” fixed value setting (1: merchant web) | Y | 1 |
TEST_REAL | Separation of tests and actual transactions - “0”: TEST deal , ”1”: REAL deal - Set to “0” during development and testing | Y | 1 |
TRT_TYPE | Classification of work - “70” Setting a fixed value (70: Payment approval request) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayON | Y | 10 |
TX_ID | Merchant transaction identification number | Y | least 4 maximum 16 |
PAY_TX_ID | Merchant transaction identification number used when requesting payment approval | Y | least 4 maximum16 |
PAY_REQ_DATE | Payment request date and time used when requesting payment authorization - “DDMMYYYYhhmmss” Type in format | Y | 14 |
TX_MAC | Message verification value - “TERM_ID + PAY_TX_ID + PAY_REQ_DATE” for MAC enter value | Y | 16 |
3.3.3 Approval result inquiry response message (PayOn -> Merchant)
Key | Value | Mecessary | Length (Byte) |
PAYMENT_TYPE | Payment method classification | Y | 2 |
API_MODE | API Operation method | Y | 1 |
TEST_REAL | Separation of tests and actual transactions | Y | 1 |
TRT_TYPE | Classification of work - “71” Fixed value setting (71: Payment approval result response) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
TX_ID | Merchant transaction identification number | Y | least 4 maximum 16 |
PAY_TX_ID | Merchant transaction identification number used when requesting payment approval | Y | least 4 maximum 16 |
RESULT_CODE | Payment approval result - “0000”: Approval success - “1001” ~ “9999”: Payment approval failure (error code defined separately) | Y | 4 |
RESULT_MSG | Payment approval failure (error code defined separately) | Y | Maximum 100 |
APPROVAL_DATE | Payment approval date and time - “DDMMYYYYhhmmss” Type in format - Enter “” in case of payment approval processing failure | option | 14 |
APPROVAL_NO | Payment approval number - Enter “” in case of payment approval processing failure | option encryption | 16 |
CANCEL_TOKEN | Token for payment cancellation verification - Verification value to determine whether the merchant's request for payment cancellation is a cancellation request by a normal method - Enter “” in case of payment approval processing failure | option encryption | 8 |
CARD_NO | Card Number - Enter only numbers for card number - Enter “” in case of payment approval processing failure | option | 1 |
3.4 Cancelllation of online card payment URL
Operating environgment | URL |
TEST | |
REAL |
3.4.1 Request to cancel payment (Affiliate -> PayOn)
Key | Value | Necessary | Length (Byte) |
PAYMENT_TYPE | Payment method classification - “OC” Use a fixed value (OC: Online Card) | Y | 2 |
API_MODE | API Operation method - “1” Fixed value setting (1: Affiliate web) | Y | 1 |
TEST_REAL | Separation of tests and actual transactions - “0”: TEST deal , ”1”: REAL deal - Set to “0” during development and testing | Y | 1 |
TRT_TYPE | Classification of work “20” Set a fixed value (20: Request cancellation of payment) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
TX_ID | Merchant transaction identification number - Use unique values managed by the merchant, such as order number | Y | lease 4 maximum 16 |
REQ_DATE | Payment cancellation request date and time - “DDMMYYYYhhmmss” Type in format | Y | 14 |
APPROVAL_NO | Payment approval number Enter the payment approval number included in the response message at the time of payment approval of the original transaction subject to cancellation | Y encryption | 14 |
CANCEL_TOKEN | Token for payment cancellation verification Enter the token for verification of payment cancellation included in the response message at the time of payment approval of the original transaction subject to cancellation | Y encryption | 8 |
CARD_NO | PayOn card number Enter only numbers for card number | Y encryption | 16 |
TX_MAC | Message verification value - Before encryption “TERM_ID + TX_ID + REQ_DATE” enter the MAC value | Y | 16 |
3.4.2 Payment cancellation result response message (PayOn -> Merchant)
Key | Value | Necessary | Length (Byte) |
PAYMENT_TYPE | Payment method classification | Y | 2 |
API_MODE | API Operation method | Y | 1 |
TEST_REAL | Separation of tests and actual transactions | Y | 1 |
TRT_TYPE | Classification of work - “21” Set a fixed value (21: Response to payment cancellation result) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
TX_ID | Merchant transaction identification number | Y | least 4 maximum 16 |
RESULT_CODE | Payment cancellation result - “0000”: Approval cancellation success - “1001” ~ “9999”: Approval cancellation failure (error code defined separately) | Y | 4 |
RESULT_MSG | Notification of payment cancellation result | Y | Maximum 100 |
CANCEL_DATE | Payment cancellation date - “DDMMYYYYhhmmss” Type in format - Enter “” in case of payment cancellation processing failure | Option | 14 |
APPROVAL_NO | Payment cancellation approval number - Enter “” in case of payment cancellation processing failure | Y Encryption | 14 |
CARD_NO | PayOn card number - Enter only numbers for card number - Enter “” in case of payment cancellation processing failure | Y Encryption | 16 |
CARD_BAL | Card balance after payment cancellation - If the currency unit is USD dollar, enter it in cents (ex: 10050 if the balance is 100 dollars 50 cents) - Enter “” in case of payment cancellation processing failure | Y Encryption | maximum 8 |
CURRENCY | Monetary unit “D”: USD dollar, “R”: Cambodian riel | 선택 | 1 |
3.5 Online card balance inquiry URL
Operating environgment | URL |
TEST | |
REAL |
3.5.1 Request for balance inquiry (Merchant -> PayOn)
Key | Value | Necessary | Length |
PAYMENT_TYPE | Payment method classification - “OC” Use a fixed value (OC: Online Card) | Y | 2 |
API_MODE | API Operation method - “1” Fixed value setting (1: Affiliate web) | Y | 1 |
TEST_REAL | Separation of tests and actual transactions - “0”: TEST deal, ”1”: REAL deal - Set to “0” during development and testing | Y | 1 |
TRT_TYPE | Classification of work - “90” Fixed value setting (90: balance inquiry request) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
CARD_NO | Card Number - Enter only numbers for card number | Y | 16 |
3.5.2 Response to balance inquiry result (PayOn -> Merchant)
Key | Value | Necessary | Length (Byte) |
PAYMENT_TYPE | Payment method classification | Y | 2 |
API_MODE | API Operation method | Y | 1 |
TEST_REAL | Separation of tests and actual transactions | Y | 1 |
TRT_TYPE | Classification of work - “91” Fixed value setting (91: Response to payment cancellation result) | Y | 2 |
MC_ID | Merchant ID given by PayOn | Y | 8 |
TERM_ID | Terminal ID given by PayOn | Y | 10 |
CARD_NO | Card Number | Y | 16 |
RESULT_CODE | Balance inquiry result - “0000”: Balance inquiry success - “1001” ~ “9999”: Balance inquiry failure (error code defined separately) | Y | 4 |
RESULT_MSG | Balance inquiry result message | Y | maximum 8 |
CURRENCY | Monetary unit - “D”: USD Dollar, “R”: Cambodian riel - Enter “” in case of balance inquiry failure | option | 1 |
Last updated