GET

Create KHQR

https://bakongapi-dev.shop/api/khqr/create

📋 Query Parameters

Parameter Type Required Description
bakong_id string Required Bakong account ID
merchantname string Required Name of the merchant
amount number Required Payment amount in USD

💻 Example Code

JavaScript (Fetch API)
const bakongId = "your_bakong_id";
const merchantName = "My Store";
const amount = 10.50;

fetch(`https://bakongapi-dev.shop/api/khqr/create?bakong_id=${bakongId}&merchantname=${merchantName}&amount=${amount}`)
  .then(response => response.json())
  .then(data => {
    console.log("QR Code:", data.bakong_qr);
    console.log("MD5:", data.md5);
  })
  .catch(error => console.error("Error:", error));
Python (Requests)
import requests

params = {
    "bakong_id": "your_bakong_id",
    "merchantname": "My Store",
    "amount": 10.50
}

response = requests.get("https://bakongapi-dev.shop/api/khqr/create", params=params)
data = response.json()

print(f"QR Code: {data['bakong_qr']}")
print(f"MD5: {data['md5']}")
cURL
curl -X GET "https://bakongapi-dev.shop/api/khqr/create?bakong_id=your_bakong_id&merchantname=My%20Store&amount=10.50"

✅ Response Example

JSON Response
{
  "bakong_qr": "https://bakongapi-dev.shop/bakong-qr?md5=db0aee0919bfcedce6efe32b773e10f3",
  "md5": "db0aee0919bfcedce6efe32b773e10f3",
  "khqrString": "00020101021230820016KHQR..."
}
GET

Check Payment Status

https://bakongapi-dev.shop/api/khqr/check

📋 Query Parameters

Parameter Type Required Description
md5 string Required MD5 hash from create response
bakong_id string Required Bakong account ID

💻 Example Code

JavaScript (Fetch API)
const md5 = "5d41402abc4b2a76b9719d911017c592";
const bakongId = "your_bakong_id";

// Check payment status
fetch(`https://bakongapi-dev.shop/api/khqr/check?md5=${md5}&bakong_id=${bakongId}`)
  .then(response => response.json())
  .then(data => {
    if (data.status === "PAID") {
      console.log("Payment received!");
    } else if (data.status === "PENDING") {
      console.log("Waiting for payment...");
    } else {
      console.log("QR Code expired");
    }
  });
Python (Requests)
import requests

params = {
    "md5": "5d41402abc4b2a76b9719d911017c592",
    "bakong_id": "your_bakong_id"
}

response = requests.get("https://bakongapi-dev.shop/api/khqr/check", params=params)
data = response.json()

if data["status"] == "PAID":
    print("Payment received!")
elif data["status"] == "PENDING":
    print("Waiting for payment...")
else:
    print("QR Code expired")

✅ Response Example

JSON Response
{
  "success": true,
  "status": "PAID",
  "bakong_id": "your_bakong_id",
  "amount": 10.5
}
⚠️ Note: Payment status can be: PENDING, PAID, or EXPIRED. QR codes expire after 15 minutes.

Choose Your Plan

Simple, transparent plans for every business size

Small
$0.60/week
Perfect for testing and small projects
  • Unlimited QR generation
  • Payment status checking
  • 15-minute QR validity
  • 24/7 support
Buy Now
Big
$5/3 months
For established businesses
  • Unlimited QR generation
  • Payment status checking
  • 15-minute QR validity
  • 24/7 support
Buy Now
Pro
$20/year
For large-scale operations
  • Unlimited QR generation
  • Payment status checking
  • 15-minute QR validity
  • 24/7 support
Buy Now