Enable Stripe ACP on Your Store: Step-by-Step
We mention Stripe ACP across multiple articles on this site but never show the actual code. This tutorial fixes that. If you already use Stripe for payments, you can enable ACP and let AI agents like ChatGPT complete purchases on your store. The core integration is surprisingly simple.
Prerequisites
- - Stripe account with API access
- - Stripe API version 2026-01 or later
- - An existing payment integration (Stripe Elements, Checkout, or PaymentIntents)
- - Products with complete data (name, description, images, price)
- - Node.js 18+ (for the code examples below)
What Is Stripe ACP?
The Agentic Commerce Protocol (ACP) is the protocol behind ChatGPT Instant Checkout. It lets AI agents initiate secure payment sessions on behalf of customers. When a user asks ChatGPT to buy something, ACP handles the entire flow: the agent creates a checkout session, the customer confirms, and Stripe processes the payment.
Stripe handles the payment processing, fraud detection through Radar, and consumer consent. Your store remains the merchant of record. You keep the customer relationship. ACP just adds a new sales channel.
If you already process payments through Stripe, enabling ACP does not require switching payment processors or changing your existing checkout flow. It adds an additional endpoint alongside your current integration.
Step 1: Upgrade Your Stripe API Version
ACP requires Stripe API version 2026-01 or later. This version introduced the agent_commerce capability for checkout sessions.
To upgrade, navigate to your Stripe Dashboard:
- Go to Developers in the left sidebar
- Click API version
- Select 2026-01 or the latest available version
- Click Upgrade
The 2026-01 API version adds the agent_commerce object to checkout sessions and introduces webhook events for agent-initiated transactions. Your existing Stripe integration will continue to work normally after the upgrade.
Step 2: Enable Agent Checkout in Stripe Dashboard
Once your API version is updated, enable the agent commerce feature:
- Navigate to Settings in the top-right menu
- Go to Product settings > Agent Commerce
- Toggle Enable agent-initiated transactions to on
- Under Allowed AI Agents, select which agents can initiate purchases (ChatGPT, Perplexity, or all ACP-compatible agents)
- Optionally set per-transaction dollar limits
This dashboard toggle is what tells Stripe to accept agent-initiated checkout sessions from your account. Without it, the API calls in the next step will return an error.
Step 3: Add the ACP Endpoint
This is the core of the integration. You need a server-side endpoint that creates agent-enabled checkout sessions. Here is a complete Node.js/Express example:
const express = require('express');
const stripe = require('stripe')('sk_live_your_key_here');
const app = express();
app.use(express.json());
// Agent checkout endpoint
app.post('/api/agent-checkout', async (req, res) => {
const { productId, quantity = 1 } = req.body;
// Fetch product from your database
const product = await getProductById(productId);
if (!product) {
return res.status(404).json({ error: 'Product not found' });
}
try {
const session = await stripe.checkout.sessions.create({
mode: 'payment',
agent_commerce: {
enabled: true,
allowed_agents: ['chatgpt', 'perplexity'],
},
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: product.name,
description: product.description,
images: [product.imageUrl],
metadata: {
gtin: product.gtin,
sku: product.sku,
},
},
unit_amount: product.priceInCents,
},
quantity: quantity,
},
],
shipping_address_collection: {
allowed_countries: ['US', 'CA', 'GB'],
},
shipping_options: [
{
shipping_rate_data: {
type: 'fixed_amount',
fixed_amount: { amount: 0, currency: 'usd' },
display_name: 'Free shipping',
delivery_estimate: {
minimum: { unit: 'business_day', value: 5 },
maximum: { unit: 'business_day', value: 7 },
},
},
},
{
shipping_rate_data: {
type: 'fixed_amount',
fixed_amount: { amount: 1500, currency: 'usd' },
display_name: 'Express shipping',
delivery_estimate: {
minimum: { unit: 'business_day', value: 1 },
maximum: { unit: 'business_day', value: 2 },
},
},
},
],
success_url: `${process.env.DOMAIN}/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${process.env.DOMAIN}/cancel`,
});
res.json({ sessionId: session.id, url: session.url });
} catch (err) {
console.error('Agent checkout error:', err);
res.status(500).json({ error: 'Checkout session creation failed' });
}
});The key difference from a standard Stripe Checkout session is the agent_commerce object. Setting enabled: true tells Stripe this session can be initiated by an AI agent. The allowed_agents array restricts which agents can use it.
Include complete product data in product_data. AI agents use the name, description, and images to display the product to the customer within the chat interface. The metadata.gtin field helps agents match your product to the one the customer originally asked about.
Step 4: Handle the Webhook
When an agent-initiated checkout completes, Stripe sends a webhook event. Add a handler for the agent_checkout.session.completed event:
// Webhook handler for agent checkout events
app.post('/webhooks/stripe', express.raw({ type: 'application/json' }), (req, res) => {
const sig = req.headers['stripe-signature'];
let event;
try {
event = stripe.webhooks.constructEvent(
req.body,
sig,
process.env.STRIPE_WEBHOOK_SECRET
);
} catch (err) {
return res.status(400).send(`Webhook Error: ${err.message}`);
}
switch (event.type) {
case 'agent_checkout.session.completed':
const session = event.data.object;
// session.agent_commerce.agent_name -> 'chatgpt'
// session.agent_commerce.agent_session_id -> unique session
// session.payment_status -> 'paid'
fulfillOrder(session);
break;
case 'agent_checkout.session.expired':
// Handle abandoned agent checkout
releaseInventory(session);
break;
}
res.json({ received: true });
});The webhook payload includes the agent_commerce object with details about which AI agent initiated the transaction. Use this metadata for analytics, customer support, and dispute resolution.
Platform-Specific Integration
The code above works for custom implementations. If you are on a major e-commerce platform, here are your options:
WooCommerce
The WooCommerce Stripe Gateway plugin (v8.0+) includes an Agent Commerce toggle under WooCommerce > Settings > Payments > Stripe > Advanced. Enable it there and the plugin handles the agent_commerce parameter automatically. If you need more control, add a custom REST endpoint using the WooCommerce REST API alongside the plugin. See our WooCommerce AI readiness guide for the full setup.
BigCommerce
BigCommerce merchants using the Stripe integration through the Checkout SDK can add the agent_commerce flag to checkout creation calls. BigCommerce is also part of the ACP rollout pipeline, so native support through the BigCommerce dashboard is expected in Q1 2026. See our BigCommerce AI optimization guide for details on preparing your store.
Magento / Adobe Commerce
The official Stripe module for Magento supports agent commerce through its configuration panel at Stores > Configuration > Sales > Payment Methods > Stripe > Agent Commerce. For stores with custom checkout flows, add a dedicated REST API endpoint using Magento's Web API framework. See our Magento AI readiness guide for the full walkthrough.
Step 5: Test Your Integration
Use Stripe's test mode to validate the integration before going live:
- Switch to test keys in your environment variables (
sk_test_...) - Trigger a test event from the Stripe CLI
- Verify the webhook handler processes the event correctly
- Check the Stripe Dashboard under Agent Commerce > Test Transactions
# Install Stripe CLI if you haven't
brew install stripe/stripe-cli/stripe
# Login to your Stripe account
stripe login
# Trigger a test agent checkout event
stripe trigger agent_checkout.session.completed
# Listen for webhook events locally
stripe listen --forward-to localhost:3000/webhooks/stripeAfter triggering the test event, confirm that your webhook handler processed it and your fulfillment logic triggered. Check the Stripe Dashboard for the test transaction details including the agent name and session metadata.
Step 6: Go Live
Once testing looks clean:
- Switch from test keys to live keys (
sk_live_...) - Update your webhook endpoint URL to your production domain
- Monitor the first few transactions in the Stripe Dashboard
- Set up Stripe alerts for agent-initiated purchases so you know when they come in
The first ChatGPT-initiated purchase will appear in your Stripe Dashboard with an "Agent Commerce" badge. You will see the agent name, session details, and the standard payment information.
Connecting ACP with BuyAction Schema
Enabling ACP is half the equation. The other half is telling AI agents that your products can be purchased through agent checkout. That is where BuyAction schema comes in.
Add BuyAction structured data to your product pages pointing to your ACP endpoint. This tells AI agents: "you can buy this product here, and here is the checkout URL."
{
"@context": "https://schema.org",
"@type": "Product",
"name": "TrailRunner Pro Hiking Boot",
"description": "Waterproof hiking boot with Vibram sole",
"image": "https://yourstore.com/images/trailrunner-pro.jpg",
"gtin14": "00012345678905",
"offers": {
"@type": "Offer",
"price": "189.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"potentialAction": {
"@type": "BuyAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://yourstore.com/api/agent-checkout?productId=trailrunner-pro",
"actionPlatform": [
"https://schema.org/DesktopWebPlatform",
"https://schema.org/MobileWebPlatform"
]
}
}
}When an AI agent crawls your product page, it finds the BuyAction and knows exactly where to send the checkout request. Combined with ACP, this creates a complete loop: discovery through schema, transaction through Stripe.
Costs and Fees
Here is what ACP transactions cost compared to standard checkout channels:
| Channel | Processing Fee | Platform Fee | Total on $100 Sale |
|---|---|---|---|
| Standard Stripe | 2.9% + $0.30 | None | $3.20 |
| ChatGPT + ACP | 2.9% + $0.30 | 4% (ChatGPT) | $7.20 |
| Google AI Mode | 2.9% + $0.30 | 0% (currently) | $3.20 |
Is Your Store Ready for ACP?
ACP is one piece of the agentic commerce stack. Our free Agent Ready Score checks your schema markup, product data, ACP readiness, and 20+ other factors AI shopping agents look for.