Decode QRcode
Introduction
Decode QRcode for payment.
API Description
Request Method:POST
Request Path:open/api/scanCode
Parameters
Request Parameters
Parameter | Sign | Mandatory | Type | Length | Description |
---|---|---|---|---|---|
appId | Y | Y | string | 64 | AppId is unique for merchant |
sign | Y | Y | string | 512 | Sign |
qrCode | Y | Y | string | 512 | QR Code string |
Response Parameters
Parameter | Type | Description |
---|---|---|
success | boolean | Success |
error | boolean | Error |
code | long | Response code |
msg | string | Response message |
traceId | string | Trace id |
model | object | Response content |
Model Response Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
bankAccountName | Y | string | User account name |
bankAccountNumber | Y | string | Bank account number |
bankCode | Y | string | Bank code |
bankName | Y | string | Bank name |
currency | Y | string | Fiat currency |
amount | N | string | Amount (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 Name | Regular Expression |
---|---|
Vietnamese Dong (VND) | ^.*704.*VN.*$ |
Philippine Peso (PHP) | ^.*608.*PH.*$ |
Updated 10 days ago