Skip to main content
Version: Next

Create QR

POST /openapi/v1/qr

Create a payment QR code for an order.

Call Get Services first to obtain the service_code (used as the x-service-code header) and bincode.

Payload before encryption:

{
"order_id": "TCTK010520260001",
"va": "VA100023312",
"bincode": "970454",
"amount": 10000
}
FieldRequiredDescription
order_id✅Order ID — max 16 alphanumeric characters (A–Z, 0–9), no special characters. E.g. TCTK010520260001
va✅Virtual account number
bincode✅Bank code
amount✕0 or empty = static QR; > 0 = dynamic QR
curl --location '<base_url>/openapi/v1/qr' \
--header 'partner-code: YOUR_PARTNER_CODE' \
--header 'x-service-code: vccb-qr' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI…' \
--header 'Content-Type: application/json' \
--data '{
"data": ENCRYPTED_PAYLOAD
}'

Request​

Headers​

NameRequiredDescription
partner-code✅Merchant identifier code (provided by TCONNECT)
Content-Type✅application/json
Authorization✅Bearer <access_token>
x-service-code✅Service code from the Get Services API (e.g. vccb-qr)

Body​

FieldTypeRequiredDescription
datastring✅AES-256-CBC encrypted payload as Hexadecimal

Response​

200 — QR created successfully​

FieldTypeDescription
image_png_base64stringBase64 string of the QR PNG image. Use directly in <img src="data:image/png;base64,...">
qr_contentstringRaw content string of the QR code — use to render manually if needed