Capture Payment
This endpoint performs a direct payment capture and is the equivalent of capturing a credit card.
This operation is idempotent based on the token, which allows for the safe retry of requests, guaranteeing the payment operation is only performed once.
<Note title="Note">Since the idempotency of this endpoint is based on the token, the inclusion of a requestId is not required. </Note>
Successful Response (201)
If payment is approved by Clearpay, returns a Payment object in response.
<Note title="Note">The Payment object is only returned if the payment is approved by Clearpay and successfully captured. If the payment is declined or fails, an error object is returned. See the Errors section below. </Note>
Connection Timeouts
| Timeout | Time (Seconds) |
|---|---|
| Open | 10 |
| Read | 70 |
Errors
In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Capture Payment:
| HTTP Status Code | errorCode | Description |
|---|---|---|
| 402 <br />Payment Required | declined | The consumer's payment has been declined. For example, invalid card details were entered during the Clearpay screenflow. Please advise the consumer to contact the Clearpay Customer Service team for more information. |
| 412 <br />Precondition Failed | invalid_token | The order token is invalid, expired, or does not exist. |
| 412 <br />Precondition Failed | invalid_order_transaction_status | The Consumer has not confirmed their payment for the order associated with this token. |
Request
- Base URL: https://global-api-sandbox.afterpay.com
- URL: https://global-api-sandbox.afterpay.com/v1/payments/capture
- Auth: HTTP basic
Headers
Request body
Response
Successful response
Changes
No recorded changes to this operation across all 1 revision of this API.