Skip to main content
ACP (Agentic Commerce Protocol) is OpenAI’s protocol for in-conversation commerce. Once you implement it, a ChatGPT user can search your catalog, review a purchase summary, and confirm an order without ever leaving the chat. The protocol works through OpenAI’s function calling API: you define three tools, host the matching endpoints, and register the tools so ChatGPT knows how to invoke them.

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 the tools 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.
1

Test search

Start a conversation asking to find products. Confirm search_products is called with the correct parameters and returns properly shaped product data.
2

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.
3

Test purchase confirmation

Use a Stripe test token (tok_visa) to confirm the purchase. Verify confirm_purchase returns an order_id and estimated_delivery.
4

Test error recovery

Test with an out-of-stock product, an expired checkout session, and a declined payment. Verify error messages are human-readable and the agent responds to each state gracefully.
Use the ACP Validator to run automated checks against all three endpoints at once.

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.