Direct API

Afterpay PayNow offers a set of payment APIs which merchants can directly integrate to their system to verify customer card details , save the payment token and initiate the payments. These APIs can be built into your applications to process online, in-app payments

These APIs support both immediate payments as well as pre-authorise and finalise payment later.

API Documentation

Card Verification & Tokenisation API - Verify the card details and tokenise the card. These tokenised cards are referred as payment tokens in our ecosystem and the process is called tokenisation. Afterpay can securely store one or more payment tokens per customer. With these payment tokens stored in your system, merchant can offer subscription based payments, immediate payments or pre-authorise the funds and do payment finalisation later.

🚧

Always ask customers for permission before saving their card information. For example, include a checkbox in your purchase flow that customers can select to specify that they want to save their card information for future purchases.

Reserve funds API - Pre-authorise the funds using payment token. The initial authorisation transaction that reserves funds on a payment token for a sale to be processed at a later time. This will help you to ensure that adequate funds remain in the customer’s account until they are authorised and settled.The funds are not debited from the cardholders account until the final payment (Capture reserve funds) is processed, but not available for customer to spend on other things.

Query Reservation API - Query the Reserve funds request done earlier.

Capture Reserve funds API - Finalise the payment for the funds reserved(pre-authorised) earlier. Post-authorisation of the funds. When a payment is captured, the funds are moved from customer's account to merchant's account.

Request Payment API - Debit payment for a specific amount using saved payment token.

Query Payment API - Query the debit payment request done earlier.

Request Refund API - Allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.

Query Refund API - Query the refund request done earlier.

Card Details API- Get the card details of a saved payment token

Retrieve Token API- Allow merchant to retrieve the payment token within a certain time period of initial card verification request. When the card verification and tokenisation is done using Afterpay iframe, the payment token is not returned to the client browser due to security reasons. The merchant backend can use this API to retrieve the payment token in this case.

Delete Token API - Allow merchant to delete the payment tokens stored in Afterpay backend.