post https://api-uat.payments.paynow.afterpaytouch.dev/v1/reservations//captures
Use this API to finalise the payment, capture the pre-authorised funds
Submit transfer request for nominated funds against prior funds reservation. Requires Revenue Assurance & Risk Assessment.
This interface could only be accessed by the Optus host. All other access will be blocked. IP whitelisting will ensure only traffic from Optus could access this endpoint.
The interface provided is an HTTP POST request and JSON response.
HTTP Request
POST https://<env>/v1/reservations/{reservationId}/captures
Path parameters
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
reservationId | string | yes | The unique identifier of the funds reservation | The id in the response of pre-authorisation(Reservation) request |
Request body
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
amount | number | yes | The value of the funds to be debited from the payment card | |
risk | Risk | yes | Information to enable risk assessment process. | Refer Risk Object |
requestor | string | yes | Who requested the funds' capture | 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/Cdil; Platform/Merchant-backend; MerchantId/ABC123; Channel/autopayment; CountryCode/AU; System Information/Java/8.3; Service/Auto-recharge |
Request-Id | yes | unique identifier for capture reserved funds request provided by the merchant |
Sample Example
curl -v -X POST https://<env>/v1/reservations/8a829417572279ad015732d66cb427b6/captures \
-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: 84c30ae966af4975984c38985bc2" \
-d '{
"amount": 100.5,
"risk": {...},
"requestor": "61402223333"
}'
Response body
A successful request returns the 201 Created
status code and a JSON response body.
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
id | string | yes | Uniquely identifies each capture attempt. This is generated by the APT | |
receiptId | string | no | Identifier for the payment successful captured | Receipt Id of the capture transaction |
amount | number | yes | The value of the funds to be debited from the payment card | |
requestor | string | yes | Who requested the funds capture | phone number, employee number etc. |
Sample Example
Status: 200 OK
{
"id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
"receiptId": "8a82944a4cc25ebf014cc2c782423202",
"amount": 100.5,
"requestor": "61402223333"
}