ZaloPay App receive order's information pay with QR Code method from AppClient.
For the sizeable orders, scanning QR codes would be ineffective. So, ZaloPay provides an API to create orders on the server-side. After calling this API, ZaloPay Server will return the responses containing order_url
, then AppClient can use this order_url
to generate QR Code.
Example:
The datapack received after creating an order successfully:
{
"return_code": 1,
"return_message": "Giao dịch thành công",
"sub_return_code": 1,
"sub_return_message": "Giao dịch thành công",
"zp_trans_token": "AC-YGb2kvGFAmLzTmQD-PdjA",
"order_url": "https://qcgateway.zalopay.vn/openinapp?order=eyJ6cHRyYW5zdG9rZW4iOiJBQy1ZR2Iya3ZHRkFtTHpUbVFELVBkakEiLCJhcHBpZCI6MjAwMDAwfQ==",
"order_token": "AC-YGb2kvGFAmLzTmQD-PdjA",
"qr_code": "00020101021226520010vn.zalopay0203001010627000503173916460741942585138620010A00000072701320006970454011899ZP23237O000015450208QRIBFTTA5204739953037045405690005802VN62210817391646074194258516304766E"
}
AppClient use the order_url
field to generate QR code, ZaloPay App could acquire this QR code information to make payment.
https://qcgateway.zalopay.vn/openinapp?order=eyJ6cHRyYW5zdG9rZW4iOiIxOTA3MTkwMDAwMDExMjluOVo2VjlPIiwiYXBwaWQiOjU1M30
This is the QR code of the order_url
above: