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

NameTypeMandatoryDescriptionComment
tokenstringyesThe unique identifier representing the customer's payment card
amountnumberyesThe value of the funds to be transferred from the payment card
currencystringyesThe currency in which the transaction is to occur
riskRiskyesInformation to enable risk assessment process.Refer Risk Object
requestorstringyesWho requested the reservation of the fundsphone number, employee number etc.

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/json
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oauth-token (Refer Authentication)
User-AgentyesAll 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-Idyesunique 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.

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each reservation attempt. This is generated by the Afterpay
receiptIdstringyesidentifier for reservation made
tokenstringyesThe unique identifier representing the customer's payment card
amountnumberyesThe value of the funds to be transferred from the payment card
currencystringyesThe currency in which the transaction is to occur
requestorstringyesWho requested the reservation of the fundsphone number, employee number etc.

Sample Example

Status: 200 OK

{
  "id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
  "receiptId": "8a829417572279ad015732d66cb427b6",
  "token": "6966af4975984c30ae2e2c18985bc21c",
  "amount": 100.5,
  "currency": "AUD",
  "requestor": "61402223333"
}

Language
Click Try It! to start a request and see the response here!