post https://api-uat.payments.paynow.afterpaytouch.dev/v1/reservations
Use this API to pre-authorise the funds using card token
Submit Reservation request for nominated funds on Payment Token. Requires Revenue Assurance & Risk Assessment.
This interface could only be accessed by the merchant 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 POST request and JSON response.
HTTP Request
POST https://<env>/v1/reservations
Request body
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
token | string | yes | The unique identifier representing the customer's payment card | |
amount | number | yes | The value of the funds to be transferred from the payment card | |
currency | string | yes | The currency in which the transaction is to occur | |
risk | Risk | yes | Information to enable risk assessment process. | Refer Risk Object |
requestor | string | yes | Who requested the reservation of the funds | phone number, employee number etc. |
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/Digital; MerchantId/ABC123; Channel/sms; CountryCode/AU; System Information/Java/8.3; Service/Shop |
Request-Id | yes | unique identifier for reserve funds request provided by merchant |
Sample Example
curl -v -X POST https://<env>/v1/reservations \
-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: 8456732415666565656565656565657" \
-d '{
"token": "6966af4975984c30ae2e2c18985bc21c",
"amount": 100.5,
"currency": "AUD",
"risk": {...},
"requestor": "61402223333"
}'
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 each reservation attempt. This is generated by the Afterpay | |
receiptId | string | yes | identifier for reservation made | |
token | string | yes | The unique identifier representing the customer's payment card | |
amount | number | yes | The value of the funds to be transferred from the payment card | |
currency | string | yes | The currency in which the transaction is to occur | |
requestor | string | yes | Who requested the 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"
}