The information on this page outlines the key points that should be reviewed when upgrading from API V1 to V2. The recommendation is to reach out to your Afterpay Contact to receive direct support and guidance on when completing this activity.

CreateOrder vs CreateCheckout - Retrieving an Afterpay TokenCreateOrder /v1/orders: Response Body includes 2 values in response, (token and expiry)CreateCheckout /v2/checkouts: Response Body includes 3 values in response, (token, expiry, and redirect URL)Field totalAmount is updated to amount
totalAmount.amount - functionally the same as totalAmount for v1/orders.Field Suburb is updated to area1
Field State is updated to region
State.region - functionally the same as totalAmount for v1/orders.GetOrder vs GetCheckout - Checking the Token’s Order InformationAPI V2 provides Approved and Declined responses inside the response body. Ensure you check the response body for the order’s Approval Status.
When integrating in API V1, an Approved order results in a 201 response; whilst a Declined order provides a 402 response. When upgrading from V1 to V2, instead of checking for a 402 response, please check the response body for the Approval Status.
Order Management requests (i.e. GET Payment, Create refund, Update payment, Reverse Payment, etc.) can only be utilised once a payment capture has occurred. I.e. do not try and attempt a GET v2/payments/{order_id} request prior to receiving a 201 (successful) response for the v2/payments/capture or v2/payments/{order_id}/capture request. This also applies to v1 order management endpoints.
Auth and Capture was not previously available in API V1. This addition includes three endpoints, Auth/Capture/Void. When moving from V1 Immediate Capture to V2 Auth/Capture process, note that all uncaptured orders will be automatically voided 13 days after completing this request. Voided orders cannot be ‘un-voided’.
Auth
V1: Auth/Capture not available
V2: Auth /v2/payments/auth
Auth Approved: Body response includes Approval Status
Auth Declined: Body response includes Decline Status
Auth has an expiry time, please check the expiry time to ensure all orders are CAPTURED, or Partially or completely Voided before the expiry time is up.
At the expiry time, orders will be automatically voided; any paid funds returned to the customer and the order will no longer be able to be captured.
Capture
Void
Authorised payments (201 v2/payments/auth responses) will be automatically voided 13 days after completing this request.
Please note that once a payment has been voided it can no longer be captured (v2/payments/{order_id}/capture)
Any captured amounts can still be refunded via v2/payments/{order_id}/refund against the portion of the order that was captured.