Table of content

Use cases

1. Retrieve accepted payment sources

  • Purpose: To determine which type of payment method (domestic, international source issued in Vietnam, or international source issued abroad) is accepted by the merchant.
  • Scenario: A customer scans a VNPAY QR code and wants to choose a valid payment source.
  • System action: The system calls /check-source-money with customer and merchant details.
  • Outcome: VNPAY returns the list of accepted payment sources.
  • Benefit: The customer selects the correct account or card for payment.

2. Retrieve billing information

  • Purpose: To verify bill details before payment.
  • Scenario: A customer scans a VNPAY QR code in NCB’s mobile app.
  • System action: The system calls /get-infor-qr-vnpay with the QR data, voucher code (if any), payment amount, payment source
  • Outcome: VNPAY returns the status of QR data (if the QR code is already paid or data has been changed), promotion value, merchant type
  • Benefit: The customer validates the bill before confirming payment.

3. Notify successful payment

  • Purpose: To synchronize transaction status with VNPAY.
  • Scenario: After the customer completes payment, NCB records the transaction internally.
  • System action: NCB calls /qr-vnpay-pay with payment details.
  • Outcome: VNPAY validates the payment transaction such as QR data, voucher and then notifies the biller of successful payment so that the biller can process the order. After the order is processed, VNPAY can respond the process status (resCode field) to NCB in which if the order fails, this may trigger a call to void the transaction. The list of resCode is as belows:

Error code

Error codeVoid (Y/N)Error description
00NSuccess
01YInvalid input data
02YIP address is not allowed to access
03YPartner code is not configured in VNPAY system
04YInvalid phone number
06YInvalid PayDate
07YMerchant does not exist
08NSuspicious transaction, customer’s funds are on hold
11YMerchant is not activated or has been locked
12YInvalid signature
13YTransaction has already been paid
14YInvalid or blocked transaction for this merchant
15YOriginal transaction not found
16YInvalid payment amount
17YTransaction expired
18YInvalid responsecode
19YPayment account is locked
20YPhone number is locked
21YTerminal code does not exist
23YDuplicate transaction: Invoice number has already been paid or traceTransfer is duplicated
24YTerminal code is not activated or has been locked
25YMaster merchant code does not exist
26YMaster merchant code is not activated or has been locked
29YQR code has expired
30YQR code data has been modified
31YMultiple QR code payments are not from the same merchant
76YBank or wallet is not accepted for payment at this merchant or terminal
89YMaster merchant is locked or does not support payment
96YMerchant under maintenance
99YSystem error
  • Benefit: Ensures accurate settlement and transparency between NCB, VNPAY, and the biller.

4. Void failed transaction

  • Purpose: To handle transaction failures and prevent invalid reconciliation.
  • Scenario: A payment attempt fails due to insufficient funds, expired QR, or system error.
  • System action: NCB calls /void-qr-vnpay with the failed transaction reference.
  • Outcome: VNPAY voids the transaction and ensures it is excluded from settlement.
  • Benefit: Provides proper reconciliation and reduces disputes.