Cancel Reserve Funds

Use this API to void the pre-authorisation completed earlier ; cancel the reservation

Cancel a reservation request.

This interface could only be accessed by the merchant host. All other access will be blocked. IP whitelisting will ensure only traffic from the merchnat backend could access this endpoint.

The interface provided is an HTTP DELETE Request and JSON response.

HTTP Request

DELETE https://<env>/v1/reservations/{reservationId}?requestor={requestor}

Path parameters

NameTypeMandatoryDescriptionComment
reservationIdstringyesThe unique identifier of the funds' reservation provided by Afterpay

Query parameters

NameTypeMandatoryDescriptionComment
requestorstringyesWho requested the cancellation of reservationphone number, employee number etc.

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/json; charset=UTF-8
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oath-token (Refer Authentication)
User-AgentyesAll requests must include information about the Merchant, Platform, Channel and Service. For example Merchant/Optus; Platform/Crimson; MerchantId/ABC123; Channel/SMS; CountryCode/AU; System Information/Java/8.3; Service/Auto-recharge
Request-Idyesunique identifier for cancel reservation request provided by Merchant

Sample Example

curl -v -X DELETE https://<env>/v1/reservations/13e753e2e4a4b2f692b573e5fbe98b7b5523586a?requestor=61402223333 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer c92b326fff28aba21821349c3ef411e" \
-H "User-Agent: Merchant/ABC; Platform/Digital; MerchantId/ABC123; Channel/web; CountryCode/AU System Information/Java/8.3; Service/Shop" \
-H "Request-Id: 84567324156665656565656565656510" \

Response body

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each reservation cancellation request. This is generated by the Afterpay
receiptIdstringyesIdentifier for the cancellation request

Sample Example

Status: 200 OK
{
  "id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
  "receiptId": "8a82944a4cc25ebf014cc2c782423202"
}
Path Params
string
required

The unique identifier of the funds' reservation provided by Afterpay ; the id in the reservation response

Query Params
string
required

Who requested the cancellation of reservation

Headers
string
required

Bearer

string
required

All requests must include information about the Merchant, Platform, Channel and Service.

string
required

unique identifier for cancel reservation request provided by Merchant

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json