Required endpoints
Your ACP integration needs exactly three endpoints. These map directly to theinitiate_checkout and confirm_purchase tool calls in ChatGPT.
| Endpoint | Method | Description |
|---|---|---|
/acp/checkout/create | POST | Create or open a checkout session |
/acp/checkout/:id/update | PATCH | Update cart or session — shipping, items |
/acp/checkout/:id/complete | POST | Complete the purchase and return confirmation |
Webhooks
Configure webhooks so your backend receives real-time events from your PSP after payment completes or fails. Relying only on the synchronous/complete response is not sufficient — network failures can leave order state inconsistent.
Stripe
Always verify the Stripe signature before processing an event. Use
stripe.webhooks.constructEvent — never trust the raw request body alone.Razorpay (India)
For Indian merchants using Razorpay, subscribe to equivalent payment events in the Razorpay Dashboard and verify theX-Razorpay-Signature header on each webhook delivery using your webhook secret.
Events to handle
| Event | Action |
|---|---|
payment_intent.succeeded | Fulfill the order; update status to confirmed |
payment_intent.payment_failed | Mark the order failed; allow retry |
charge.dispute.created | Flag the order for review |
Idempotency
Idempotency is critical for ACP. If a network timeout causes an agent to retry a request, your server must return the same response instead of creating a duplicate order or charging the card twice. The middleware pattern below intercepts the response, caches it against the idempotency key in Redis, and returns the cached response on any repeat request.Production go-live checklist
Staging validation
Run the full checkout flow in staging using Stripe test tokens:
tok_visa— successful paymenttok_chargeDeclined— payment declinedtok_cvcCheckFail— CVC failure
Load testing
Confirm your endpoints handle concurrent checkout requests without race conditions. Pay particular attention to inventory depletion — two agents must not be able to purchase the last unit simultaneously.
Webhook verification
Verify all Stripe webhook events are received and processed correctly in staging before switching to production. Use the Stripe CLI to replay events locally:
Register with OpenAI
Register your ACP tool definitions in the OpenAI platform when using GPT Actions, or pass them dynamically through the function calling API. Test the full conversation flow in ChatGPT’s sandbox environment before enabling for end users.
Run Asva validation
Use the ACP Validator for an automated check of all endpoint schemas and response shapes.
Monitoring
Set up alerts for the following signals. These are the earliest indicators of a degraded ACP integration.- Checkout completion rate dropping below 90%
- P95 checkout completion latency exceeding 5 seconds
- Webhook delivery failures
- Payment failure rate spikes