v1
latestOpenAPI 3.0.12026-07-24204977.5 KBOrders
Scan consumer QR
Use this endpoint to create an order to initiate payment using ShopBack’s consumer-presented QR code.
post/posi-sandbox/v1/instore/order/scan
Headers
Authorizationstring required
Example:SB1-HMAC-SHA256 <accessKeyId>:<hmacSignature>
Header required for authorization. Specify the HMAC signature in the Authorization header along with accessKeyId. Please refer to Generating an HMAC Signature for a step by step guide to generating the Authorization signature.
Datestring required
Example:2022-08-22T02:29:33.123Z
The date and time of request in <a href=https://en.wikipedia.org/wiki/ISO_8601 target="_blank">ISO-8601</a> format. This should be the same value used in the generation of the HMAC signature
X-ShopBack-Idempotent-Idstring
Example:faa5e09a-8cf3-43f7-8309-d94deb426e66
Idempotent Id for the request. If this is absent, every request will be treated as unique and will be processed as such. (This is optional for now, but will be made required in the future)
Request body
Example request
{
"posId": "802c987em7f747269a5e6c260c630kpl",
"country": "SG",
"amount": 1234,
"currency": "SGD",
"referenceId": "352c530dd7f747161a5e6c990c720bec",
"consumerQrPayload": "0101234567890128TECI",
"partner": {
"merchantEntityId": "UEN in Singapore"
},
"orderMetadata": {
"terminalReference": "TW001271r-CEalBMhQw",
"merchantOrderReference": "7YaEQwQi-3c6aRCJbz0N"
}
}Response
Example response
{
"qrType": "base64",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAAN...",
"traceId": "0dc44317-1c4b-4b62-83a8-8997435511e4",
"partner": {
"merchantEntityId": "UEN in Singapore"
},
"orderMetadata": {
"terminalReference": "TW001271r-CEalBMhQw",
"merchantOrderReference": "7YaEQwQi-3c6aRCJbz0N"
}
}