Menu

Please select your page

Place the order

Checkout / Authorize

Astrid places the items into her Cart, and goes to the Checkout page. She sees AfterPay as an option, and selects it.

When she clicks the Buy button, the shop sends a POST call to the AUTHORIZE endpoint of the AfterPay eCommerce API. This call contains Astrid’s name, email, national ID number, and postal address; and the details of the items she is buying. The API responds with a confirmation.

Now a reservation exists in AfterPay’s accounts, in the merchant’s name, for the purchase price. Before responding, AfterPay has used the provided details to run a risk/credit check, and is happy to accept this invoice.

The API request contains the following blocks:

Payment This determines the payment method, out of those offered by AfterPay. Any method besides Invoice requires additional information; please see the detailed payment object documentation for further information.

Customer This contains the customer’s personally identifiable information, including their postal address.

Mandatory fields depend on the country. Click here to see which fields are required for each country.

Order This contains the details of the purchase:

  • Number – this is a unique identifier for the order. It is provided by the merchant, and can be human-readable. Can contain letters, numbers, dashes, and underscores. Not case-sensitive.
  • TotalGrossAmount – the full payable amount of the order. Sum of grossUnitPrice * quantity for all Order Items.
  • TotalNetAmount
  • Currency
  • Items

Order.Items Details of the items being purchased

For each order item, the following information is provided:

  • ProductID – the unique identifier of the item in the invoice. Provided by the merchant. Can be equivalent to the merchant’s own SKU.
  • Description – the name of the item, as it appears on the invoice line.
  • ImageURL – the product image. Optional.
  • GrossUnitPrice – the price for one unit of this item, including VAT.
  • netUnitPrice – the price for one unit of this item, including VAT.
  • vatPercent – the VAT rate for this item as a number (e.g. 19% VAT - "vatPercent": 19)
  • vatAmount – provided as a currency value, not a percentage.
  • Quantity – the amount of units of this item included in the purchase.
  • Type – optional parameter used to identify items like digital downloads, shipping fees, etc. These are handled differently from normal items during refunds and for accounting purposes.

See the detailed API documentation for more information.

Request

Response