v1

latestOpenAPI 3.0.12026-07-24204977.5 KB
Orders

Cancel order

Use this endpoint to cancel a payment before processing. Cancellations are not allowed once a customer has swiped-to-pay on ShopBack’s mobile application.

post/posi-sandbox/v1/instore/order/{referenceId}/cancel

Path parameters

referenceIdstring required

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)

Request body

reasonstring

The reason explaining cancellation.

Example request

{
  "reason": "Incorrect amount"
}

Response

traceIdstring required

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

referenceIdstring required

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.

Example response

{
  "traceId": "0dc44317-1c4b-4b62-83a8-8997435511e4"
}