Before creating an Afterpay checkout the merchant needs to retrieve the minimum and maximum order amounts that Afterpay is enabled for. This is done through the Get Configuration endpoint.
This call should be done as apart of a scheduled background process. We recommend calling this endpoint once a day and storing the
The merchant should use these values to determine:
- The correct Afterpay Messaging to show on the Product Detail pages
- Whether Afterpay should be presented as an available payment method.
A request to create a checkout will be declined if the order grand total is less than the minimum, or more than the maximum Afterpay amount. Check with your Afterpay contact to change your minimum or maximum range.
You will call the Create Checkout endpoint to tell Afterpay information including:
- Customer Information
- Order Details
- Order Total
- Shipping Information
- URL you would like to direct the customer to when they complete the Afterpay checkout flow
Afterpay uses the Order Total value to calculate the installment plan and to assist with the consumer’s pre-approval process.
Afterpay will respond with a token used to identify this checkout.
After the consumer completes the checkout flow they will be returned to the Merchant website URL provided in the Create Checkout request. If using the redirect method the URL will have status appended to the Merchant URL. For Example:
- If the consumer successfully completes the checkout flow:
- If the consumer closes the window:
A popup method is also available which uses a
postMessageto communicate the status and token.
Updated over 2 years ago