Prerequisites
Before you start, make sure you have:- API endpoints you control on any stack
- A payment processor — Stripe is the most common choice for ACP; use Razorpay if you are targeting India
- A structured product catalog exposed through an API
- Basic familiarity with OpenAI function calling
ACP tool definitions
You must define exactly three tools for ChatGPT to invoke:search_products, initiate_checkout, and confirm_purchase. Pass these definitions as JSON when registering with OpenAI.
Tool definitions
Implement the tool endpoints
Each tool maps to one HTTP endpoint on your server. Implement all three before registering with OpenAI.search_products
initiate_checkout
confirm_purchase
Register tools with OpenAI
Pass your tool definitions in thetools array when creating a chat completion. Set tool_choice to "auto" so the model decides when to invoke them.
Test your implementation
Work through each scenario below before connecting to a live payment processor.Test search
Start a conversation asking to find products. Confirm
search_products is called with the correct parameters and returns properly shaped product data.Test checkout initiation
After search results appear, ask to purchase one item. Confirm
initiate_checkout is called and returns a valid checkout summary including checkout_id and expires_at.Test purchase confirmation
Use a Stripe test token (
tok_visa) to confirm the purchase. Verify confirm_purchase returns an order_id and estimated_delivery.Next steps
ACP end-to-end implementation
State machine, idempotency, and end-to-end validation checklist.
ACP tool endpoints reference
Full endpoint schema, required fields, and response shapes.
ACP checkout: webhooks and going live
Webhooks, idempotency middleware, and production go-live steps.
ACP instant checkout UX patterns
Conversation flows, failure states, and confirmation design.