Decode QRcode

Introduction

Decode QRcode for payment.

API Description

Request Method:POST

Request Path:open/api/scanCode

Parameters

Request Parameters

ParameterSignMandatoryTypeLengthDescription
appIdYYstring64AppId is unique for merchant
signYYstring512Sign
qrCodeYYstring512QR Code string

Response Parameters

ParameterTypeDescription
successbooleanSuccess
errorbooleanError
codelongResponse code
msgstringResponse message
traceIdstringTrace id
modelobjectResponse content

Model Response Parameters

ParameterMandatoryTypeDescription
bankAccountNameYstringUser account name
bankAccountNumberYstringBank account number
bankCodeYstringBank code
bankNameYstringBank name
currencyYstringFiat currency
amountNstringAmount (unit: count as fiat currency)

Success Example (VND)

{
  "code": "0",
  "msg": "success",
  "model":{
       "bankAccountName": "NGUYEN MINH HANH",
       "bankAccountNumber": "888812345678",
       "bankCode": "Techcombank",
       "bankName":"bankName",
       "currency": "VND",
       "amount": "100000"
},
  "traceId": "6668024eeb989c77a375967aded5d646",
  "success": true,
  "error": false
}

Success Example (PHP)

{
    "code": "0",
    "msg": "success",
    "model": {
        "bankCode": "PAPHPHM1",
        "amount": 3980,
        "bankAccountNumber": "102625859",
        "bankName": "PAYMAYA PHILIPPINES INC.",
        "currency": "PHP"
    },
    "traceId": "685377bb3ae611bac56ba604e2fba471",
    "success": true,
    "error": false
}

Regular Expressions for Fiat Currency QR Code Verification

  • When processing QR code payments, it's often necessary to verify the content of the QR code based on the characteristics of different countries and currencies.
  • Regular expressions provide a means to efficiently parse QR codes and extract country and currency codes. This is because QR codes commonly encode this type of information. By utilizing regular expressions, you can accurately verify the origin and currency associated with a payment QR code.
  • To facilitate quick identification, we've listed regular expressions for common fiat currencies below. These expressions can help us verify whether a QR code contains specific country or currency identification information.

Supported Fiat Currency Regular Expressions:

Fiat Currency NameRegular Expression
Vietnamese Dong (VND)^.*704.*VN.*$
Philippine Peso (PHP)^.*608.*PH.*$