什么是 ACP?
ACP(Agentic Commerce Protocol)是 OpenAI 与 Stripe 联合发布的购物协议。它让用户能够在 ChatGPT 对话中直接完成商品购买。
ACP 文件结构
ACP 配置文件位于网站根目录的 /agent.json:
{
"schema_version": "1.0",
"merchant": {
"name": "Your Brand",
"domain": "yourbrand.com",
"logo_url": "https://yourbrand.com/logo.png"
},
"product_feed_url": "https://yourbrand.com/products.xml",
"checkout_enabled": true,
"checkout_api_url": "https://yourbrand.com/api/checkout",
"payment_providers": ["stripe"],
"supported_currencies": ["USD", "EUR", "GBP"],
"shipping_countries": ["US", "CA", "GB", "DE", "FR"],
"contact_email": "support@yourbrand.com"
}配置步骤
1. 准备 Product Feed
创建符合规范的产品数据源,包含:
2. 生成 agent.json
使用 GeoAction 的 Agent 配置生成器,自动生成配置文件。
3. 集成 Stripe 支付
ACP 使用 Stripe 作为支付网关。确保你的网站已集成 Stripe:
4. 实现 Checkout API
创建一个 API 端点来处理来自 ChatGPT 的购买请求:
POST /api/checkout
{
"product_id": "xxx",
"quantity": 1,
"payment_method": "stripe"
}5. 部署并验证
上传 agent.json 到网站根目录,使用 GeoAction 验证配置。
重要字段说明
| 字段 | 必填 | 说明 |
|---|---|---|
| merchant.name | ✅ | 商家品牌名 |
| merchant.domain | ✅ | 商家域名 |
| productfeedurl | ✅ | 产品数据源 URL |
| checkout_enabled | ✅ | 是否启用结账 |
| payment_providers | ✅ | 支持的支付方式 |
| shipping_countries | ✅ | 可配送的国家 |
安全注意事项
与 UCP 的区别
| 方面 | UCP | ACP |
|---|---|---|
| 发布者 | OpenAI + Stripe | |
| 主要平台 | Google Search、Gemini | ChatGPT |
| 支付集成 | Google Pay | Stripe |
| 配置文件 | .well-known/ucp | agent.json |
建议同时配置两者
为了最大化 AI 流量,建议同时配置 UCP 和 ACP,覆盖 Google 和 OpenAI 两大生态。