Generate VietQR Code

POST

https://<vietqr-host>/<basepath>/api/qr/generate-customer

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeRequiredDescription

bankCode

String

Yes

Bank code of the account.

bankAccount

String

Yes

Bank account creates the payment code.

userBankName

String

Yes

Account holder's name. No diacritics

content

String

Yes

Payment content. Maximum 19 characters, no special characters.

qrType

Integer

Yes

Depend on the type of QR code to be created: - Dynamic VietQR: 0; - Static VietQR: 1;

- Semi-dynamic VietQR: 3.

amount

Long

Optional

Amount to be paid. <Required if "qrType" = 0 or 3>

orderId

String

Optional

Transaction ID for partner to manage. orderId will be returned when the system receives balance fluctuations (information matches with the transaction created by the QR code). <Required if "qrType" = 0>

transType

String

Optional

Transaction type: debit/credit (values: D/C). Default is “C”. <Required if "qrType" = 0>

terminalCode

String

Optional

Store/point of sale code. <Required if "qrType" = 1 or 3>

serviceCode

String

Optional

Service/product code. <Required if "qrType" = 3>

sign

String

Optional

Signature.

urlLink

String

Optional

Redirect to this url after the payment is finished.

Response

{
    "bankCode": "bank_code",
    "bankName": "bank_name",
    "bankAccount": "receiving_bank_account",
    "userBankName": "ACCOUNT_HOLDER_NAME",
    "amount": payment_amount,
    "content": "payment_content",
    "qrCode": "QR_code_as_string",
    "transactionRefId": "QR_identifier",
    "qrLink": "QR_code_as_link",
    "terminalCode": "point_of_sale_code"
}

Last updated