get https://api-uat.payments.paynow.afterpaytouch.dev/v1/reservations?requestor=&reservationRequestId =
Use this API to query the reservation(pre-authorisation) completed earlier
Search for Request Reservation status.
This interface could only be accessed by the Optus host. All other access will be blocked. IP whitelisting will ensure only traffic from the merchant backend could access this endpoint.
The interface provided is an HTTP Get Request and JSON response.
HTTP Request
GET https://<env>/v1/reservations?requestor={requestor}&reservationRequestId={reservationRequestId}
Query parameter
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
requestor | string | yes | Who requested the reservation request status | |
reservationRequestId | string | yes | Request Id of the reservation |
Sample Example
curl -v -X GET https://<env>/v1/reservations?requestor=<merchant>&reservationRequestId=18985b13e753e2e4a4b2f692b5 \
-H "Content-Type: application/json"\
-H "Accept: application/json"\
-H "Authorization: Bearer c92b326fff28aba21821349c3ef411e" \
-H "User-Agent: Merchant/Optus; Platform/Crimson; MerchantId/ABC123; Channel/SMS; CountryCode/AU System Information/Java/8.3; Service/Auto-recharge"\
-H "Request-Id: 84c30ae966af4975984c38985b3" \
Request headers
Parameter | Mandatory | Description |
---|---|---|
Content-Type | yes | application/json |
Accept | yes | application/json |
Authorization | yes | Bearer Access-admin-oauth-token (Refer Authentication) |
User-Agent | yes | All requests must include information about the Merchant, Platform, Channel and Service. For example Merchant/ABC; Platform/Merchant-backend; MerchantId/ABC123; Channel/ivr; CountryCode/AU; System Information/Java/8.3; Service/Recharge |
Request-Id | yes | unique identifier for query reservations request provided by the merchant |
Response body
A successful request returns the 200 OK
status code and a JSON response body.
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
id | string | yes | Uniquely identifies reservation attempt. This is generated by the APT | |
receiptId | string | no | identifier for successful reservation made | |
token | string | yes | The unique identifier representing the customer's payment card; card-token | |
amount | number | yes | The value of the funds to be pre-authorised from the payment card | |
currency | string | yes | The currency in which the transaction is to occur | |
requestor | string | yes | Who requested the query reservation of the funds | phone number, employee number etc. |
Sample Example
Status: 200 OK
{
"id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
"receiptId": "8a829417572279ad015732d66cb427b6",
"token": "6966af4975984c30ae2e2c18985bc21c",
"amount": 100.5,
"currency": "AUD",
"requestor": "61402223333"
}