Skip to navigation

Capture Full Payment [Express Checkout]

This endpoint performs a payment capture for the full value of the payment plan.

Note

This operation is idempotent based on the token, which allows for the safe retry of requests, guaranteeing the payment operation is only performed once.

Since the idempotency of this endpoint is based on the token, the inclusion of a requestId is not required.

Approved Response (201)

If payment is approved by Clearpay, returns a Payment object in response, with a status of “APPROVED”.

Declined Response (201)

If payment is declined by Clearpay, for example, if invalid card details were entered, returns a Payment object in response, with a status of “DECLINED”.

Please advise the consumer to contact the Clearpay Customer Service team for more information.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read70

Errors

In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Capture Full Payment:

HTTP Status CodeerrorCodeDescription
402
Payment Required
invalid_tokenThe checkout token is invalid, expired, or does not exist.
412
Precondition Failed
invalid_order_transaction_statusThe Consumer has not confirmed their payment for the order associated with this token.
422
Unprocessable Entity
invalid_objectThe checkout token was missing or empty.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
tokenstringRequired
The token returned in the Create Checkout request.
amountobjectRequired
Amount to be checked against the value in the create checkout request. If the amounts do not match, then the request will be rejected and an error specific to this scenario will be returned. This field is required for Express Checkout.
merchantReferencestringOptional

The merchant’s order id/reference that this payment corresponds to. This will update any value previously provided in the Create Checkout request.

isCheckoutAdjustedbooleanOptional
The isCheckoutAdjusted field can be used to allow the order amount to be changed after the Express Checkout flow.
paymentScheduleChecksumstringOptional

A unique value representing the payment schedule that must be provided when there has been changes since the initial order creation (retrieved from checkout widget).

itemslist of stringsOptional
shippingobjectOptional
The shipping address if it has changed since the initial order creation.

Response

200

Errors

400
Bad Request Error