Bakong Relay API

Reliable access to Bakong APIs for developers using bakong-khqr (Python SDK).

https://pypi.org/project/bakong-khqr/

Get RBK Token Developer Docs API Reference

Why Use Bakong Relay

Many developers face HTTP 403 errors when accessing Bakong APIs from servers outside Cambodia. This service allows you to use RBK tokens directly in bakong-khqr (Python SDK), so your application can reliably check transactions, accounts, and references without restrictions. Important: Only bakong-khqr (Python SDK) supports RBK tokens.

Token Example

rbklAWcavkLy5pta....Dka4XxNtYxtVT_imRtJuDgXy2Q

Sample Usage (Read-Only)


from bakong_khqr import KHQR

# Create an instance of KHQR with RBK Token or Bakong API Token:
khqr = KHQR("rbklAWcavkLy5pta....Dka4XxNtYxtVT_imRtJuDgXy2Q")

# Generate QR code data for a transaction:
qr = khqr.create_qr(
    bank_account='user_name@bank', 
    merchant_name='Your Name',
    merchant_city='Phnom Penh',
    amount=9800, 
    currency='KHR', 
    store_label='MShop',
    phone_number='85512345678',
    bill_number='TRX01234567',
    terminal_label='Cashier-01',
    static=False
)
print(qr)

# Generate Deeplink:
deeplink = khqr.generate_deeplink(
    qr,
    callback="https://your_website.com/shop/details?q=ABC",
    appIconUrl="https://your_website.com/images/logo.png",
    appName="MyAppName"
)
print(deeplink)

# Get Hash MD5
md5 = khqr.generate_md5(qr)
print(md5)

# Check Transaction paid or unpaid:
payment_status = khqr.check_payment(md5)
print(payment_status)

# Retrieve the payment information:
payment_info = khqr.get_payment(md5)
print(payment_info)

# Check Bulk Transactions:
md5_list = [
    "dfcabf4598d1c405a75540a3d4ca099d", 
    "5154e4f795634ff1a0ae4b48e53a6d9c"
]
bulk_payments_status = khqr.check_bulk_payments(md5_list)
print(bulk_payments_status)

Pricing (Beta)

Free Trial

$0

1,050 API calls / 7 days

BEST VALUE

Starter

$2.5

10,000 API calls / month

Growth

$5

30,000 API calls / month

FAQ

Which API calls count toward the limit?
Which API calls do NOT count toward the limit?