Endpoint overview
| Endpoint | Method | Purpose |
|---|---|---|
/acp/checkout/create | POST | Create a new checkout session |
/acp/checkout/:id/update | PATCH | Update cart or session details |
/acp/checkout/:id/complete | POST | Confirm and complete the purchase |
| Endpoint | Method | Purpose |
|---|---|---|
/acp/products/search | GET | Search catalog — backs the search_products tool |
/acp/orders/:id | GET | Order status and tracking |
/acp/orders/history | GET | User’s order history for reorder flows |
POST /acp/checkout/create
Creates a new checkout session with the selected items. Call this endpoint when the initiate_checkout tool is invoked.
Request parameters
Array of items to include in the checkout session.
Unique identifier for the product.
Variant identifier — required when the product has size, color, or other options.
Number of units to purchase.
Destination address. Required if your catalog ships physical goods.
Full name of the recipient.
Street address line.
City.
State or province code (e.g.
"CA").Postal code.
ISO 3166-1 alpha-2 country code (e.g.
"US").Unique key for this request. Identical keys must return the same response without creating a duplicate session.
Response fields
Unique identifier for the checkout session. Pass this to subsequent update and complete calls.
Current session state. Always
"pending_confirmation" on creation.Echoed item list with resolved names and prices.
Product identifier.
Variant identifier.
Human-readable product and variant label.
Quantity requested.
Price per unit with
amount (integer, smallest currency unit) and currency (ISO 4217).Sum of item prices before shipping and tax, with
amount and currency.Available shipping methods. Each has
id, name, and cost.Estimated tax with
amount and currency. May be refined at completion.ISO 8601 timestamp when this session expires. Default is 15 minutes from creation.
| Status | Code | Description |
|---|---|---|
| 409 | out_of_stock | One or more items are unavailable |
| 422 | invalid_address | Shipping address failed validation |
| 429 | rate_limited | Too many checkout attempts from this user |
PATCH /acp/checkout/:id/update
Updates mutable fields on an existing session — most commonly the selected shipping option. Call this after the user chooses a shipping method.
Request parameters
The
id of the shipping option selected by the user.Response fields
Identifier of the updated session.
Current session state. Remains
"pending_confirmation" after a successful update.The confirmed shipping selection with
id, name, and cost.Updated total including subtotal, selected shipping, and tax, with
amount and currency.POST /acp/checkout/:id/complete
Processes payment and confirms the order. Call this endpoint when confirm_purchase is invoked — only after the user has explicitly confirmed the purchase summary.
Request parameters
Payment method details from your PSP.
Payment method type. Use
"card" for Stripe card tokens.Tokenized payment credential from your PSP. Use
"tok_visa_4242" in staging.Shipping option to apply if not already set in a prior update call.
Unique key for this completion request. Must differ from the key used on create.
Response fields
Unique identifier for the confirmed order.
Order status.
"confirmed" on success.Final charged amount with
amount and currency.ISO 8601 date string for expected delivery.
Human-readable order reference for customer support.
URL to the order receipt page.
| Status | Code | Description |
|---|---|---|
| 402 | payment_declined | Payment failed |
| 409 | out_of_stock | Item became unavailable before confirmation |
| 410 | session_expired | Checkout session is past expires_at |
| 422 | validation_error | Missing or invalid required fields |
Latency requirements
| Endpoint | Max response time |
|---|---|
| Create checkout | 3 seconds |
| Update checkout | 1 second |
| Complete checkout | 5 seconds |
Response validation checklist
Run through this list before going live:- All responses include
Content-Type: application/json - All amounts are in the smallest currency unit (cents for USD)
- Error responses include both
codeand a human-readablemessage -
expires_atis returned on checkout creation - Order confirmation includes
order_idandestimated_delivery - Response times are within the limits above
- Idempotency keys prevent duplicate orders on retry
Related
ACP end-to-end implementation
State machine and full validation checklist.
ACP instant checkout UX patterns
UX patterns and failure state handling.