Skip to main content
An order is created when an approved checkout completes. From then on, it records every step of the purchase, from the agent’s first request to delivery and any return.
Everything past search needs a test key. In keyless test mode these tools return needs_test_key.

From search to order

complete_checkout takes the checkout ID, the mandate ID and an idempotency key. Reuse the same key if you have to resend the call, so the order is placed once.

Order states

get_order returns the order’s current state. After placement, returns, refunds and disputes also show on the order:

Order events

Every step adds an event to the order. Events are append-only: they are never edited or deleted. get_order_events returns them in order.
Session events record what the agent did. Order events record what happened to the purchase.

Money

get_order_receipt returns where the money went, from the quote to any refund:

After the order

Returns and refunds are their own records, linked to the order. To cancel or change an order, use cancel_order or modify_order.