APG PayAPG Paydocs

API reference

Orders

4 endpoints

An order is the commerce record, what was bought, for how much, by whom. A transaction is the attempt to collect money against it. One order may have several transactions if the first attempt fails or the order is paid in instalments.

Create an order when you want the platform to hold the line items and the amount owed; go straight to a transaction when you only need to take a payment.

To pay an order, create a transaction naming it: POST /transactions with the orderId and a payment token. The token decides how the money is taken, card, Apple Pay, direct debit, PayTo and the rest are all variants of creating one.

To let the payer do it themselves, create the order with OrdrCmdCreateInvoice and you get a payment link back with it. The link is a bearer credential: whoever holds it can read and pay the order, and the token is returned exactly once. Reissue it with the paymentLink group on the PATCH, which supersedes the last one.