orders:write scope. Each step below links to its endpoint in the API reference.
1. Look up the reference data
Card search needs at least 2 characters and returns up to 50 results per page.
2. Create the order
- Items: up to 100 lines, each with a quantity of 1 to 100. A line with a quantity of 2 becomes two cards in the order.
- Shipping address: required unless the shipping method is vault storage. The billing address defaults to the shipping address. Send
billing_address, with the same fields, to use a different one. - Optional services: send their codes in
upcharges. Fees that apply automatically, such as the sports card surcharge, can’t be requested. - Idempotency: send an
Idempotency-Keyso a retried request can’t create a second order. See Idempotency.
201 with the order.
3. Send the customer to pay
New orders are created asplaced with a payment_status of pending. While the order is unpaid, it has a payment_url:
payment_url to pay on AGS. Once paid, payment_url is null.
Rules that reject an order
These come back as a422 with the order_rejected error code, and a message explaining the problem:
- A card’s declared value is above the service level’s maximum protection.
- The order’s total declared value is over $500 and
signatureisn’t inupcharges. - A declared value or the order total is too large to store.
Follow the order
GET /orders lists the orders you created through the API for the account, newest first. GET /orders/{id} returns one with its cards. Both need the orders:read scope.
Your app sees only the orders it created. Orders the customer created on AGS or through other apps return 404.
payment_status is pending, due or paid.