Idempotency-Key header with POST /orders, and retry with the same key and body. AGS creates the order at most once.
Responses
The body comparison ignores key order and whitespace, so a retry only needs the same values.
Rejected orders
If an order is rejected, withvalidation_failed or order_rejected, the key isn’t used up. Fix the request and retry with the same key.
If a request fails on our side before the order is created, the key is released, so a retry with it creates the order. If our server stops mid-request, the key is released after a minute.
Without an
Idempotency-Key, every request creates a new order.