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_idOrder ID — max 16 alphanumeric characters (A–Z, 0–9), no special characters. E.g. TCTK010520260001
vaVirtual account number
bincodeBank code
amount0 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-codeMerchant identifier code (provided by TCONNECT)
Content-Typeapplication/json
AuthorizationBearer <access_token>
x-service-codeService code from the Get Services API (e.g. vccb-qr)

Body

FieldTypeRequiredDescription
datastringAES-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