Skip to main content

Create QRPay/QRGlobal QR Code

Process​

  • MERCHANT calls API to create QRPay/QRGlobal QR code to Baokim system.
  • Baokim verifies the request (JWT, digital signature), looks up SUB MERCHANT information to retrieve payment point identifiers (card_acceptor_id, MCC code, etc.).
  • Baokim system generates QR string according to VietQR/EMVCo standards and initializes the order.
  • Baokim returns the result (qr_string, qr_url) to MERCHANT for displaying to the payer.
  • The same QR code accepts both domestic payment (QRPay) and cross-border payment (QRGlobal); the transaction type is differentiated via the qr_type field in the transaction notification webhook.

API Information​

Method: POST

URL: /b2b/core/api/ext/mm/qr/create

Security: Bearer JWT (Authorization header)

Request​

Main Parameters​

No.Field NameData TypeRequiredDescription
1request_idString(100)✅Unique ID for each Request from MERCHANT to Baokim
2request_timeString(20)✅Request send time. Format: YYYY-MM-DD H:i:s
3master_merchant_codeString(50)✅Unique identifier for MASTER MERCHANT
4sub_merchant_codeString(50)✅Unique identifier for SUB MERCHANT
5mrc_order_idString(50)✅Merchant order code, unique per SUB MERCHANT. For static QR (acc_type = 2): serves as the QR code identifier
6acc_typeInteger✅QR code type: 1 = Dynamic, 2 = Static
7amountInteger⚠️Payment amount (VND, integer).
Required when acc_type = 1 (Dynamic QR), fixed per order.
Static QR: not sent (NULL), payer enters amount when scanning
8memoString(25)✅Payment description displayed when scanning QR (max 25 characters, no accents)
9post_codeString(10)✅Postal code of the payment acceptance point
10store_codeString❌Store code
11branch_codeString❌Branch code
12staff_codeString❌Staff code

Request Example​

{
"request_id": "MERCHANT050015588QR001",
"request_time": "2026-06-10 14:41:00",
"master_merchant_code": "MASTERMERCHANT",
"sub_merchant_code": "SUBMERCHANT",
"mrc_order_id": "ORD_123456789",
"acc_type": 1,
"amount": 200000,
"memo": "Thanh toan don hang",
"post_code": "100000",
"store_code": null,
"branch_code": null,
"staff_code": null
}

Response​

Main Parameters​

No.Field NameData TypeRequiredDescription
1codeNumber(3)✅Baokim error code
2messageString(200)✅Baokim error message
3dataObject✅Data returned by Baokim

Data Information​

No.Field NameData TypeRequiredDescription
1order_idInteger✅Baokim order code
2mrc_order_idString✅Merchant order code
3acc_typeInteger✅QR code type: 1 = Dynamic, 2 = Static
4amountInteger❌Payment amount. NULL for static QR
5qr_stringText✅QR string according to EMVCo standard, used by Merchant to generate QR image
6qr_urlString✅URL to QR code image
7created_atDatetime✅Order creation time
8updated_atDatetime✅Order update time

Response Example​

{
"code": 100,
"message": "Successfully",
"data": {
"order_id": 1870436,
"mrc_order_id": "ORD_123456789",
"acc_type": 1,
"amount": 200000,
"qr_string": "00020101021238550010A0000007270123000697040300000000000020386304C3A4",
"qr_url": "https://sandbox.baokim.vn/qr/BK1234567890.png",
"created_at": "2026-06-10 14:41:05",
"updated_at": "2026-06-10 14:41:05"
}
}

Error Codes​

Error CodeDescription
100Success
11Failed
101Baokim system error
103Signature verification error
104JWT authentication error
422Invalid data (incorrect format, missing required fields)
504Timeout
707Order ID already exists
709Master Merchant cannot create transactions directly
710Sub Merchant does not exist
711Master Merchant does not exist
712Sub Merchant is inactive
713Master Merchant is inactive
714Sub Merchant does not belong to Master Merchant
717Service code does not exist
718Service code is inactive
720Token is invalid
724Fee configuration not found