Auth

This endpoint requests a payment auth, which determines the order approval status. If approved, the auth will have an expiration date and time, which is returned in the events list for the "AUTH_APPROVED" payment event.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

📘

Note

This operation is idempotent based on the requestId (if provided), which allows for the safe retry of multiple requests, guaranteeing the payment operation is only performed once.

📘

Note

The consumer's payment plan will begin at the time of auth approval.

Approved Response (201)

If payment is approved by Afterpay, returns a Payment object in response, with a status of "APPROVED" and a paymentState of "AUTH_APPROVED".

Declined Response (402)

If payment is declined by Afterpay, for example, if invalid card details were entered, returns a Payment object in response, with a status of "DECLINED" and a paymentState of "AUTH_DECLINED".

Please advise the consumer to contact the Afterpay 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 Auth:

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.
Body Params
string

A unique request ID, required for idempotent retries. It is recommended that the merchant generate a UUID for each unique request.

string
required

The token returned in the Create Checkout request.

string

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

Headers
string
required
Defaults to application/json
string
required
Defaults to Readme.io API Simulator
string
Defaults to application/json
Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here!