APIs for Businesses
Home
APIs
  • Checkout/ Deeplink
  • Merchant Proxy
  • Bill24 Hosted
  • Auto Direct Debit
  • KHQR Integration Specification for API
  • Notification API
  • On Boarding Sub Biller API
Home
APIs
  • Checkout/ Deeplink
  • Merchant Proxy
  • Bill24 Hosted
  • Auto Direct Debit
  • KHQR Integration Specification for API
  • Notification API
  • On Boarding Sub Biller API
  1. KHQR Integration Specification for API
  • KHQR Integration Specification for API
    • Overview
    • Transaction Initiation
      POST
    • Transaction Verification
      POST
    • Webhook
      POST
  1. KHQR Integration Specification for API

Transaction Initiation

POST
https://merchantapi-demo.bill24.io/transaction/v2/init
This operation is to create transaction and generate QR code.

Request

Header Params
Content-Type
string 
required
Example:
application/json
Accept
string 
required
Example:
application/json
token
string 
required
AccessToken will be share separately
Example:
{AccessToken}
Body Params application/json
Body Params
identity_code
string 
required
Reference number from merchant system
currency
string 
required
Currency code ISO 4217(USD, KHR...)
amount
integer 
required
Amount to pay
device_code
string 
optional
Serial number of QR code display device or terminal
(You need to map the device code in your system)
channel_code
string 
required
Payment channel code
(You can get channel code from GetBillerProfile function)
purpose_of_transaction
string 
required
Bill issue date or bill number
customer_code
string 
optional
Customer code
customer_name
string 
optional
Name of the customer
customer_phone
string 
optional
Phone number of the customer
customer_email
string 
optional
Email address of the customer
description
string 
optional
Description
cancel_url
string 
optional
The URL that will redirect to when customer cancel the payment
redirect_url
string 
optional
The URL that will redirect to after payment completed
language
string 
optional
The language displayed on the checkout page, default is km
km : Khmer
en : English
Example
{
  "identity_code": "174952172035635",
  "currency": "KHR",
  "amount": 105800,
  "device_code": "T1",
  "channel_code": "1",
  "purpose_of_transaction": "INV23001",
  "customer_code": "12340001",
  "customer_name": "Chea Samnang",
  "customer_phone": "010888999",
  "customer_email": "example@gmail.com",
  "description": "",
  "cancel_url": "https://example.com/checkout/cancel",
  "redirect_url": "https://checkoutapidemo-demo.bill24.net/checkout/redirect",
  "language": "km"
}

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 'https://merchantapi-demo.bill24.io/transaction/v2/init' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'token: {AccessToken}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identity_code": "174952172035635",
    "currency": "KHR",
    "amount": 105800.00,
    "device_code": "T1",
    "channel_code": "1",
    "purpose_of_transaction": "INV23001",
    "customer_code": "12340001",
    "customer_name": "Chea Samnang",
    "customer_phone": "010888999",
    "customer_email": "example@gmail.com",
    "description": "",
    "cancel_url": "https://example.com/checkout/cancel",
    "redirect_url": "https://checkoutapidemo-demo.bill24.net/checkout/redirect",
    "language": "km"
}'

Responses

🟢200Success
application/json
Body
Responses
code
string 
required
Response code
message
string 
required
Response message
message_kh
string 
required
Response message in Khmer
data
object 
required
Data object
identity_code
string 
required
Reference number from merchant system
payment_link
string 
required
Bill24 hosted checkout page
khqr_string
string 
required
Raw KHQR data, biller need to convert to image
Example
{
    "code": "SUCCESS",
    "message": "Transaction initiation success.",
    "message_kh": ប្រតិបត្តិការបង្កើតជោគជ័យ",
    "data": {
        "identity_code": "174952172035635",
        "payment_link": "https:/bill24.io/pay/Bill24_EYhKXzwC0",
        "khqr_string": "00020101021229450014wing_khqr@wing011009666645540209WingBank52045999530384054041.005802KH5915Kranh Virackbot6010PhnomPenh9917001316847322197766304E117"
    }
}
Previous
Overview
Next
Transaction Verification