AI エージェントでコンテキストに応じた販売を実現非公開プレビュー
ローコードソリューションを使用して、AI エージェントのコンテキストに沿った商品の販売を開始する方法をご紹介します。
プライベートプレビュー
ビジネスでエージェントコマースを使用して商品を販売したい場合は、待機リストに登録してください。
メモ
This guide is for e-commerce businesses. If you’re a marketplace and want to offer in-context agentic selling on your platform, see our guide for platforms and marketplaces.
Stripe アカウントを設定する
Stripe アカウントをまだお持ちでない場合は、作成します。メールを確認したら、ビジネスと個人情報の詳細を提供し、Payouts 用の銀行口座を関連付け、2 段階認証などのセキュリティ機能を設定して、決済を有効にする必要があります。
Then, create your business’s public identity by setting up a Stripe profile in the Dashboard.
税金を設定
Stripe Tax を使用して税金を管理し、個々の商品に設定を適用します。税金設定ガイドに従って Stripe Tax を設定します。
商品カタログの CSV アップロードで、stripe_ 列を設定して、商品を税金処理に関連付けます。
Stripe は、Anrok、Avalara、Sphere などのサードパーティーの税務プロバイダーによる税金計算にも対応しています。
Stripe に商品カタログデータをアップロードする
Stripe 製品カタログの仕様に準拠した CSV ファイルを作成します。
Stripe にカタログデータをアップロードする
Stripe ダッシュボードまたは Stripe API でフィードを送信します。15 分ごとに更新を送信できます。
購入への対応と注文のフルフィルメント
AI チャットエージェントを介して行われた注文は、次の3つの方法で監視できます。
AI チャットエージェントでの販売を有効にする
AI チャットエージェントで販売する準備ができたら、Stripe ダッシュボードでエージェントの規約をレビューし、エージェントを有効にします。Stripe はエージェントに承認リクエストを送信し、エージェントは承認する必要があります。
AI チャットエージェントでの販売を一時停止または停止するには、ダッシュボードでエージェントを無効にするか、Stripe APIを使用して終了リクエストを送信します。
curl -X POST https://api.stripe.com/v2/agentic_commerce/agreements/{{AGREEMENT_ID}}/terminate \ -u:sk_test_BQokikJOvBiI2HlWgH4olfQ2
AI エージェントとの合意が確定または終了すると、Webhook が送信されます。
agentic_commerce_ agreement. confirmed agentic_commerce_ agreement. terminated
オプション手動でキャプチャーする
デフォルトでは、Stripe は購入後すぐに決済をキャプチャーします。手動キャプチャーを使用するには、ダッシュボードのエージェント設定ページを開き、キャプチャーモードを手動に設定します。手動キャプチャーを有効にすると、PaymentIntent で capture メソッドを呼び出します。
curl -X POST https://api.stripe.com/v1/payment_intents/pi_3MrPBM2eZvKYlo2C1TEMacFD/capture \ -u "<secret_key>:" \ -H "Stripe-Version: 2025-09-30.preview"
オプション確認前の承認フックを設定する
デフォルトでは、決済を確定する前に、Stripe はお客様の商品カタログデータに基づいて在庫を確認し、Radar で不正利用チェックを実行します。購入を完了するかどうかを制御するには、手動の承認フックを設定してください。Checkout を完了する前に、Stripe はお客様のサービスに承認リクエストを送信します。リクエストを承認、または却下してください。
手動承認フックを設定するには
- ダッシュボードでエンドポイントを指定します。
- エンドポイントにロジックを実装し、以下のリクエストとレスポンスの形式を使用します。
承認リクエスト形式
Stripe はエンドポイントに次のリクエストを送信します。
{ type: String, id: String, livemode: Boolean, // account ID context?: String, // request specific data data: { amount_total: Integer, amount_subtotal: Integer, total_details?: { amount_discount?: Number, amount_fulfillment?: Number, amount_tax?: Number }, currency: String, line_items_details: Array<{ sku_id: String, unit_amount: Number, quantity: Number, amount_subtotal: Integer, amount_total: Integer, amount_tax: Integer, amount_discount: Integer }>, payment_method_details?: { type: "card" | ..., card?: { brand: "amex" | "visa" | "master_card" | ..., country?: String, exp_month: Number, exp_year: Number, funding: "credit" | "debit" | "prepaid" | "unknown", last4: String, wallet?: { type: "apple_pay" | "google_pay" | ... } }, billing_details?: { name?: String, address?: { line1?: String, line2?: String, city?: String, state?: String, postal_code?: String, country?: String } }, }, fulfillment_details?: { name?: String, address?: { line1?: String, line2?: String, city?: String, state?: String, postal_code?: String, country?: String }, email?: String, phone?: String, } } }
応答形式
{ manual_approval_details?: { type: "approved" | "declined", declined?: { reason: String } } }
オプション配送オプションフックを設定する
デフォルトでは、Stripe は商品カタログで定義されたオプションに基づいて、商品の配送オプションを計算します。各オプションには、名前、説明、配送予定日、料金が含まれます。商品カタログでは、商品ごとに送料無料を設定できます。
独自のロジックで配送オプションとコストを動的に計算するには、配送オプションフックを実装します。カート内のアイテムとともに Checkout をエージェントに返す前にフックが呼び出されます。その後、エージェント UI は計算した配送オプションと価格を表示します。
リクエスト形式
次の例は、配送オプションを計算するためにお客様が設定したリバース API エンドポイントに、compute_ リクエストの入力を送信する方法を示しています。
{ livemode: Boolean, currency: String, amount_total: Integer, amount_subtotal: Integer, total_details?: { amount_discount?: Number, amount_tax?: Number }, line_items_details: [ { sku_id: String, unit_amount: Integer, quantity: Integer, amount_subtotal: Integer, amount_total: Integer, amount_tax: Integer, amount_discount: Integer } ], fulfillment_details?: { address?: { line1?: String, line2?: String, city?: String, state?: String, postal_code?: String, country?: String } } }
応答形式
HTTP/1.1 200 OK { fulfillment_options: [ { display_name: String, description: String, earliest_delivery_time: Integer, latest_delivery_time: Integer, shipping_amount: Integer } ] }
オプション増分インベントリ更新を送信する
商品カタログのアップロードに加えて、Inventory Feed API を使用して個別の商品在庫の更新を送信します。カタログのアップロードと同じアップロードプロセスを使用しますが、standard_ を inventory_ に設定します。
# Step 1: Upload your CSV using the Files API curl https://files.stripe.com/v1/files \ -u: \ -F purpose=data_management_manual_upload \ -F file="@/path/to/your/file.csv;type=text/csv" # Step 2: Create an ImportSet object curl https://api.stripe.com/v1/data_management/import_sets \ -H "Stripe-Version: 2025-09-30.clover;udap_beta=v1" \ -usk_test_BQokikJOvBiI2HlWgH4olfQ2: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="inventory_feed"sk_test_BQokikJOvBiI2HlWgH4olfQ2
オプション返金および不審請求の申し立ての処理
決済が成功した後、顧客がウェブサイトまたは顧客サービスで注文をキャンセルした場合は、返金を開始します。Checkout Sessions API または PaymentIntents API をすでに使用している場合は、エージェントによる決済では既存の返金するフローは変更されずに機能します。
返金と不審請求の申し立ては、ダッシュボードの取引ページで管理することも、Refunds API を使用してプログラムで処理することもできます。