delete https://api-uat.payments.paynow.afterpaytouch.dev/v1/reservations/?requestor=
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
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
reservationId | string | yes | The unique identifier of the funds' reservation provided by Afterpay |
Query parameters
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
requestor | string | yes | Who requested the cancellation of reservation | phone number, employee number etc. |
Request headers
Parameter | Mandatory | Description |
---|---|---|
Content-Type | yes | application/json; charset=UTF-8 |
Accept | yes | application/json |
Authorization | yes | Bearer Access-admin-oath-token (Refer Authentication) |
User-Agent | yes | All 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-Id | yes | unique 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
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
id | string | yes | Uniquely identifies each reservation cancellation request. This is generated by the Afterpay | |
receiptId | string | yes | Identifier for the cancellation request |
Sample Example
Status: 200 OK
{
"id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
"receiptId": "8a82944a4cc25ebf014cc2c782423202"
}