v1

latestOpenAPI 3.0.12026-07-24204977.5 KB
Orders

Get order status

Use this endpoint to check for the status and details of an order.

get/posi-sandbox/v1/instore/order/{referenceId}

Path parameters

referenceIdstring required
Example:352c530dd7f747161a5e6c990c720bec

The unique payment attempt identifier generated by the POS terminal that was sent in the request to POST /v1/instore/order/create or POST /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)

Response

traceIdstring required

A unique identifier for this API response. This will be used for reconciliation as necessary.

createdAtstring date-time required

The timestamp of the payment attempt creation time, according to <a href=https://en.wikipedia.org/wiki/ISO_8601 target="_blank">ISO-8601</a> format.

updatedAtstring date-time required

The timestamp of the payment attempt's latest update, according to <a href=https://en.wikipedia.org/wiki/ISO_8601 target="_blank">ISO-8601</a> format.

shopbackOrderIdstring required

This is a unique ID generated by ShopBack, returned when the order status has reached either CAPTURED or FAILED from PROCESSING. This ID is displayed on the consumer ShopBack mobile app. Keeping track of this ShopBack Order ID on POS terminal displays can help with in-store refunds. This will also be displayed on ShopBack’s Merchant Portal.

referenceIdstring required

The unique payment attempt identifier generated by the POS terminal that was sent in the request parameters.

status'CREATED' | 'PENDING' | 'PROCESSING' | 'CANCELLED' | 'CAPTURED' | 'FAILED' | 'REFUNDED' | 'ABANDONED' required

Order status provided by ShopBack.

StatusDescription
CREATEDOrder has been created.
PENDINGThe payment is pending action from the customer. This indicates that the customer has scanned the QR code on ShopBack’s mobile application but has not yet swiped to pay.
PROCESSINGThe payment is being processed. This indicates that the customer has swiped to pay on ShopBack’s mobile application and the payment is being completed.
CANCELLEDThe order was cancelled before the customer swiped to pay.
CAPTUREDShopBack has approved the payment and it has been successful.
FAILEDShopBack has declined the payment (there could be a number of reasons including the customer’s underlying payment method not having a sufficient balance).
REFUNDEDOrder has been refunded in full (refund amount equal to order amount).
orderAmountnumber required

The original authorised amount of the order.

refundAmountnumber required

Total refunded amount for order, only provided if there has been a successful refund.

failureReasonstring

Reason for order failure, only provided if an order failed.

currencystring required

Currency that is associated with the payment amount. Specify the three-letter ISO currency code following <a href=https://en.wikipedia.org/wiki/ISO_4217 target="_blank">ISO-4217</a> standard, in UPPERCASE.

paymentType'PAYLATER' | 'PAY' required

Customer’s payment type. Populated for completed and refunded orders only.

Example response

{
  "traceId": "0dc44317-1c4b-4b62-83a8-8997435511e4",
  "createdAt": "2022-08-01T02:29:33.123Z",
  "updatedAt": "2022-08-01T02:29:33.123Z",
  "shopbackOrderId": "220801-0679-YVUY",
  "referenceId": "352c530dd7f747161a5e6c990c720bec",
  "status": "CAPTURED",
  "orderAmount": 1000,
  "currency": "SGD",
  "partner": {
    "merchantEntityId": "UEN in Singapore"
  },
  "orderMetadata": {
    "terminalReference": "TW001271r-CEalBMhQw",
    "merchantOrderReference": "7YaEQwQi-3c6aRCJbz0N"
  },
  "paymentType": "PAY"
}