SCAN_CODE
The SCAN_CODE
method involves displaying a QR code or barcode that the consumer scans with their mobile device to authenticate the payment. This flow is particularly popular for cross-device payments, starting on desktop and continuing on mobile.
There are no required authenticationSettings
for the SCAN_CODE
authentication type.
If the payment method you are using allows merchants to customize the code expiry time, you can set this value using the scanBy
field.
Request
//...
"authenticationSettings": [
{
"type": "SCAN_CODE",
"settings": {
"scanBy": "2025-03-26T20:24:27Z"
}
}
]
//...
Response
{...
"authenticationMethods": [
{
"type": "SCAN_CODE",
"details": {
"codePayload": "upiGlobal://start_tx?id=abc&amount=100¤cy=USD&from=QR",
"codeImage": "https://qr.ppro.com/image.png?payload=aWQ9YWJjJmFtb3VudD0xMDAmY3VycmVuY3k9VVNEJmZyb209UVI",
"codeDocument": "cdn.ppro.com//linktocodedocument",
"scanBy": "2023-03-26T20:24:27Z",
"codeType": "QR"
},
}
]
...}
codePayload
is the content the partner can use to render the code image on their side.codeImage
is the code already rendered as a PNG image for convenience.codeDocument
is a link to a document in which the code is displayed to the consumer. Only used by some payment methods (e.g. OXXO or Boleto vouchers)scanBy
contains the ISO 8601 format timestamp at which the code authentication expires. If you set a custom value using the authenticationSettings field above, your custom time will be reflected here. If not, it will generate a default value according to the payment method being used.codeType
Enum describing the type of code that should be used to render the code image from the payload. Possible values:QR
,UPC
,ITF
,CODE128
Updated 7 days ago