This guide explains how to integrate Amazon product purchases using the Headless Checkout API.
When creating an order for an Amazon product, use the productLocator
parameter with either the Amazon ASIN or product URL:
// Amazon ASIN
{
"lineItems": [
{
"productLocator": "amazon:B01DFKC2SO"
}
]
}
// Amazon Product URL
{
"lineItems": [
{
"productLocator": "amazon:https://www.amazon.com/dp/B01DFKC2SO"
}
]
}
Example Flow
Create the order
- Specify the receipient’s email
- Specify their shipping information
- Specify the payment method used
- Specify the product locator
POST /api/2022-06-09/orders
{
"recipient": {
"email": "buyer@example.com",
"physicalAddress": {
"name": "John Doe", // required
"line1": "123 Main St", // required
"city": "San Francisco", // required
"state": "CA", // required for US addresses
"postalCode": "94105", // required
"country": "US" // required - only US is currently supported
}
},
"payment": {
"method": "ethereum-sepolia",
"currency": "eth"
},
"lineItems": [
{
"productLocator": "amazon:B01DFKC2SO"
}
]
}
Check order status
With all requied information provided, the order’s response will include payment preparation details, as shown below.
{
"order": {
"orderId": "...",
"quote": {
"status": "valid",
...
},
"payment": {
"preparation": {
... // Payment details will be present here
}
}
}
}
Responses are generated using AI and may contain mistakes.