# AI エージェントでコンテキストに応じた販売を実現 AI エージェントを使って、コンテキストに応じた商品販売の方法を学びましょう。 > ビジネスでエージェントコマースを使用して商品を販売したい場合は、[待機リストに登録](https://go.stripe.global/agentic-commerce-contact-sales)してください。 > このガイドは EC 事業者向けです。もし貴社がマーケットプレイスで、自社プラットフォーム上でのコンテキストに応じた代理販売を提供したい場合は、[プラットフォームおよびマーケットプレイス向けガイド](https://docs.stripe.com/connect/saas/tasks/enable-in-context-selling-on-ai-agents.md) をご覧ください。 ## Stripe アカウントを設定する Stripe アカウントをまだお持ちでない場合は、アカウントを[作成](https://stripe.com/register)します。メールを確認したら、ビジネスと個人情報の入力、入金用の銀行口座のリンク、二段階認証の設定を行って、決済を有効にします。次に、Stripe ダッシュボードで[エージェンティックコマースアカウント登録](https://dashboard.stripe.com/agentic-commerce)に移動します。このガイドに従って、[Stripe プロフィール](https://docs.stripe.com/get-started/account/profile.md)の作成とエージェンティックコマースの設定を行います。 ## 税金を設定 [Stripe Tax](https://docs.stripe.com/tax.md) を使用して税金を管理し、個々の商品に設定を適用します。[税金設定ガイド](https://docs.stripe.com/tax/set-up.md?dashboard-or-api=api)に従って Stripe Tax を設定します。商品データの CSV アップロードで、`stripe_product_tax_code` を設定して、商品を税金処理に関連付けます。Stripe は、Avalara、Sphere などのサードパーティー税金プロバイダーによる税金計算もサポートしています。 ## サポートおよびリーガルポリシーの設定 [エージェンティックコマース設定](https://dashboard.stripe.com/settings/agentic-commerce)ページで、 **返金および返品ポリシー**、 **利用規約**、 **プライバシーポリシー**へのリンクを追加します。オプションで、 **店舗のポリシー**へのリンクを指定できます。 ## Stripe に商品データをアップロードする [Stripe 商品フィードの仕様](https://docs.stripe.com/agentic-commerce/product-feed.md)に準拠した CSV ファイルを作成します。 ### Stripe への商品データのアップロード Stripe ダッシュボードまたは Stripe API を介して商品データを送信します。商品データはいつでもアップロードできます。データを最新の状態にするには、1 日 1 回商品データをアップロードし、在庫と価格の増分更新を頻繁に送信してください。 > フィードのアップロードは、独立した非同期タスクとして処理されます。アップロードが送信された順に処理または完了するとは限りません。複数のファイルを連続してすばやくアップロードすると、後からアップロードされたものが先にアップロードされたものより先に完了することがあります。 #### API Stripe API を使用して、商品データ CSV をアップロードします。本番更新を有効にする前に、サンドボックスを使用して解析、フィールドマッピング、データ品質を検証することをお勧めします。 まず、[Files API](https://docs.stripe.com/api/files.md) を使用して商品データ CSV をアップロードします。リクエストが成功すると、[File オブジェクト](https://docs.stripe.com/api/files/object.md)が返されます。これには `id` が含まれます。 - `data_management_manual_upload` の目的を指定します。 - ファイルアップロードの MIME タイプは、そのファイル形式に対応している必要があります。使用できる形式は、CSV と TSV です。各行は 1 つの商品またはバリエーションを表します。 - 最大ファイルサイズは 200 MB です。 ```curl curl https://files.stripe.com/v1/files \ -u <>: \ -F purpose=data_management_manual_upload \ -F file="@/path/to/your/file.csv;type=text/csv" ``` 次に、Data Management API を使用して `ImportSet` を作成します。このコールにより商品データ処理が開始され、ダッシュボードでデータを使用できるようになります。以下を含めます。 - Files API が返したファイル `ID`。 - プレビューヘッダー (`Stripe-Version: 2025-09-30.clover;udap_beta=v1` など)。 ```curl curl https://api.stripe.com/v1/data_management/import_sets \ -H "Stripe-Version: 2025-09-30.clover;udap_beta=v1" \ -u <>: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="product_catalog_feed" ``` ### フィードステータスを監視し、エラーを解決する Stripe は商品データを処理し、検証とクリーンアップを行い、AI エージェントに送信できる形式でインデックスを作成します。インデックス作成の進捗状況は、次の 2 つの方法で監視できます。 #### API GET リクエストを作成し、`ImportSet` オブジェクトの`ステータス`フィールドを確認します。ステータスは `pending`、`failed`、`succeeded`、`succeeded_with_errors`、`pending_archive`、`archived` のいずれかです。 ```curl curl https://api.stripe.com/v1/data_management/import_sets/{{IMPORT_SET_ID}} \ -H "Stripe-Version: 2025-09-30.clover;udap_beta=v1" \ -u <>: ``` レスポンスには、ステータスとエラーが含まれます。 ```json { "id": "impset_7MabcdZ8b617780e5145413", "object": "data_management.import_set", "created": 1643992696, "livemode": true, "result": { "errors": { "file": "file_234923sIENc", "row_count": 30 }, "rows_processed": 120, "successes": { "row_count": 90 } }, "status": "succeeded_with_errors" } ``` インポートのステータスが `succeeded_with_errors` の場合は、エラーレポートをダウンロードできます。 1. 応答で `result.errors.file` フィールドを探します。 1. [Files API](https://docs.stripe.com/api/files.md) を使用して、ファイル ID を使用してエラーファイルのコンテンツを取得します。 1. ダウンロードされた CSV ファイルには、`stripe_error_message` という先頭の列に各行が失敗した理由を示す元のデータが含まれています。 ```curl curl https://files.stripe.com/v1/files/{{ERROR_FILE_ID}}/contents \ -u <>: ``` API は、失敗した行のみを含む CSV ファイルを返します。各エラーを説明する `stripe_error_message` 列が含まれます。 #### Webhook カタログデータのインデックス作成が完了すると、Stripe は `data_management.import_set.succeeded` イベントと `data_management.import_set.failed` イベントを送信します。Webhook には `ImportSet` オブジェクトが含まれます。これらのイベントをリッスンするエンドポイントを設定します。詳細な手順については、[Webhook ガイド](https://docs.stripe.com/webhooks.md)を参照してください。 `data_management.import_set.succeeded` Webhook ペイロードの例を次に示します。 ```javascript { "id": "evt_1SnVHnJ7cqJy0Q5brV8sp35q", "object": "event", "api_version": "2025-01-27.acacia", "created": 1767925127, "data": { "object": { "id": "impset_test_61Twt7AHmQQUohHQq41J7cqJy0Q5bQs4", "object": "data_management.import_set", "created": 1767924632381, "file": "file_1SnV9UJ7cqJy0Q5bpJBbU5Sk", "livemode": false, "status": "succeeded_with_errors", "result": { "errors": { "file": "file_234923sIENc", "row_count": 30 }, "rows_processed": 120, "successes": { "row_count": 90 } } } }, "type": "data_management.import_set.succeeded" } ``` インポートのステータスが `succeeded_with_errors` の場合は、エラーレポートをダウンロードできます。 1. ペイロードで `result.errors.file` フィールドを探します。 1. [Files API](https://docs.stripe.com/api/files.md) を使用して、ファイル ID を使用してエラーファイルのコンテンツを取得します。 1. ダウンロードされた CSV ファイルには、`stripe_error_message` という先頭の列に各行が失敗した理由を示す元のデータが含まれています。 ```curl curl https://files.stripe.com/v1/files/{{ERROR_FILE_ID}}/contents \ -u <>: ``` API は、失敗した行のみを含む CSV ファイルを返します。各エラーを説明する `stripe_error_message` 列が含まれます。 #### ダッシュボード ダッシュボードの[フィード履歴](https://dashboard.stripe.com/agentic-commerce/feed-history)ページに移動し、商品データの CSV をアップロードします。 ## カスタム注文 URL を設定する デフォルトでは、注文が確定すると、Stripe は顧客に[支払領収書](https://docs.stripe.com/receipts.md)を返します。セルフホストの注文 URL を指定するには、以下のようにします: 1. ダッシュボードの[エージェンティックコマース設定](https://dashboard.stripe.com/settings/agentic-commerce)ページで、**領収書タイプ**ドロップダウンで**カスタムページ**を選択します。 1. **カスタムページの URL** フィールドに注文 URL を入力します。URL は `{CHECKOUT_SESSION_ID}` テンプレート変数を含んでいる必要があります。注文が確定されると、Stripe は自動的に Checkout セッション ID でこれを置き換えます。この ID を使用して Checkout Session を検索し、注文情報を表示することができます。 ## 購入への対応と注文のフルフィルメント AI チャットエージェントを介して行われた注文は、次の 3 つの方法で監視できます。 #### ダッシュボード ダッシュボードの[取引ページ](https://dashboard.stripe.com/payments)で注文を表示します。注文は元のエージェントでタグ付けされています。エージェント名で取引をフィルタリングすることもできます。 #### Webhook エージェントが注文を完了すると、Stripe は `checkout.session.completed` を送信します。注文ごとに一意の `checkout.session.completed` イベントを生成します。Webhook には [CheckoutSession](https://docs.stripe.com/api/checkout/sessions/object.md) オブジェクトが含まれます。`checkout.session.completed` イベントをリッスンするエンドポイントを設定します。詳細な手順については、[Webhook ガイド](https://docs.stripe.com/webhooks.md) を参照してください。 ```javascript const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); // Use the secret provided by Stripe CLI for local testing // or your webhook endpoint's secret const endpointSecret = 'whsec_...'; app.post('/webhook', (request, response) => { const sig = request.headers['stripe-signature']; let event; try { event = stripe.webhooks.constructEvent(request.body, sig, endpointSecret); } catch (err) { response.status(400).send(`Webhook Error: ${err.message}`); return; } if (event.type === 'checkout.session.completed') { const session = event.data.object; // Fulfill the order using the session data fulfillCheckout(session.id); } response.status(200).send(); }); ``` `checkout.session.completed` の webhook ペイロードの例は以下のとおりです。 ```javascript { "id": "evt_1SUz6YRhxngcl2jFHhAi1Wiu", "object": "event", "api_version": "2025-10-29.clover", "created": 1763511518, "data": { "object": { "id": "cs_test_a1exHOZ77Pg40P1hPtcWe2oT2xI8G9ruoQohXq6jkKldIPQaGsNSPQmOGZ", "object": "checkout.session", ... "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } }, "livemode": false, ... "type": "checkout.session.completed" } ``` Webhook を受信したら、1 回の API コールですべての必須フィールドを取得します。複数のリクエストを回避するには、`Stripe-Version: 2025-12-15.preview` のプレビューヘッダーを指定して、[expand](https://docs.stripe.com/api/expanding_objects.md) リクエストパラメーターを使用してサブリソースを展開します。 ```curl curl https://api.stripe.com/v1/checkout/sessions/{{SESSION_ID}}?expand[]=line_items.data.price.product&expand[]=line_items.data.taxes&expand[]=payment_intent.latest_charge \ -u <>: \ -H "Stripe-Version: 2025-12-15.preview" ``` `amount_total`、quantity、SKU ID など、拡張された [CheckoutSession](https://docs.stripe.com/api/checkout/sessions/object.md) のフィールドをご覧ください。 ### Checkout セッションのフィールドリファレンス | 注文フィールド | 利用可能なリソース | API パス | | ------------------------------ | --------------------------------------------- | ----------------------------------------------------------------------------------- | | **注文日** | `CheckoutSession.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.created` | | **注文数量** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].quantity` | | **SKU** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].price.external_reference` | | **商品説明** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].price.product.description` | | **単価** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].price.unit_amount` | | **税額** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].Taxes[].amount` | | **税種別** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].Taxes[].Rate.tax_type` | | **税率** | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].Taxes[].Rate.percentage` | | **ShippingAddress** | `CheckoutSessions` | `CheckoutSessions.CollectedInformation.shipping_details` | | **BillingAddress** | `CheckoutSessions.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.billing_details` | | **Last4** | `CheckoutSessions.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.last4` | | **ExpMonth** | `CheckoutSessions.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.exp_month` | | **ExpYear** | `CheckoutSessions.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.exp_year` | | **CreditCardType** | `CheckoutSessions.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.brand` | | **最終金額** | `CheckoutSessions` | `CheckoutSessions.amount_total` | | **GTIN** (Private preview) | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].price.product.identifiers.gtin` | | **MPN** (Private preview) | `CheckoutSessions` | `CheckoutSession.LineItems.Data[].price.product.identifiers.mpn` | | **エージェント詳細** (Private preview) | `CheckoutSession.PaymentIntent` | `CheckoutSessions.PaymentIntent.agent_details` | | **OrderNo** | `CheckoutSession.PaymentIntent.LatestCharge` | `CheckoutSessions.PaymentIntent.LatestCharge.receipt_number` | #### バッチ処理 各注文を個別にフルフィルメントする代わりに、[List CheckoutSessions エンドポイント](https://docs.stripe.com/api/checkout/sessions/list.md) を使用して注文を一括フルフィルメントします。 ```curl # List all successful CheckoutSessions in the last hour curl https://api.stripe.com/v1/checkout/sessions?created[gt]={{TIMESTAMP}}&status=complete \ -u <>: ``` フルフィルメントの重複を回避するには、`starting_after` パラメーターを使用します。 ```curl curl https://api.stripe.com/v1/checkout/sessions?created[gt]={{TIMESTAMP}}&status=complete&starting_after={{LAST_SESSION_ID}} \ -u <>: ``` ## 実装のテスト ダッシュボードから[サンドボックス](https://docs.stripe.com/sandboxes.md)で直接インテグレーションをテストできます。 1. [エージェンティックコマース](https://dashboard.stripe.com/agentic-commerce)ページに移動し、**カタログを表示**をクリックします。 1. テストする製品にカーソルを合わせて、**ワークベンチでテスト**をクリックします。 ## AI チャットエージェントでの販売の有効化 AI チャットエージェントで販売を行う準備ができたら、Stripe ダッシュボードでエージェントの規約をレビューし、エージェントを有効にします。Stripe はエージェントに承認リクエストを送信し、エージェントは承認する必要があります。AI チャットエージェントでの販売を一時停止または停止するには、ダッシュボードでエージェントを無効にします。 ## Optional: 手動でキャプチャーする デフォルトでは、Stripe は購入後すぐに決済をキャプチャーします。手動キャプチャーを使用するには、ダッシュボードの[エージェンティックコマース設定](https://dashboard.stripe.com/settings/agentic-commerce)ページを開き、キャプチャーモードを手動に設定します。手動キャプチャーを有効にすると、`capture` メソッドを `PaymentIntent` で呼び出します。 ```curl curl -X POST https://api.stripe.com/v1/payment_intents/pi_3MrPBM2eZvKYlo2C1TEMacFD/capture \ -u ":" \ -H "Stripe-Version: 2025-09-30.preview" ``` ## Optional: 注文承認フックを設定する デフォルトでは、支払いを確定する前に、Stripe は商品カタログデータに基づいて在庫を確認し、[Radar](https://docs.stripe.com/radar.md) で不正利用チェックを実行します。購入を完了するかどうかを制御するには、注文の承認フックを設定してください。決済を完了する前に、Stripe はサービスに承認リクエストを送信します。リクエストを承認または拒否してください。 Stripe はフックに 4 秒のタイムアウトを適用します。この時間内にフックが応答しない場合、Stripe は支払いを拒否します。 注文承認フックを設定するには: 1. ダッシュボードの [Agentic コマース設定](https://dashboard.stripe.com/settings/agentic-commerce)ページでエンドポイントを指定します。 1. **Order approvals** を有効にします。 1. エンドポイントにロジックを実装し、以下のリクエストとレスポンスの形式を使用します。 ### リクエスト形式 Stripe はエンドポイントに次のリクエストを送信します。 ```typescript { type: "v1.delegated_checkout.finalize_checkout", id: string, livemode: boolean, // account ID context?: string, // request specific data data: { amount_subtotal?: number, amount_total?: number, billing_details?: { name?: string, address?: { line1?: string, line2?: string, city?: string, state?: string, postal_code?: string, country?: string } }, currency: string, email?: string, line_items_details: Array<{ id: string, unit_amount: number, quantity: number, name: string }>, payment_method_details?: { type: "card" | ..., card?: { brand: "amex" | "visa" | "master_card" | ..., country?: string, exp_month: number, exp_year: number, fingerprint?: string, funding: "credit" | "debit" | "prepaid" | "unknown", iin?: string, last4: string, wallet?: { type: "apple_pay" | "google_pay" | ... } } }, phone?: string, shipping_details?: { name?: string, address?: { line1?: string, line2?: string, city?: string, state?: string, postal_code?: string, country?: string }, }, total_details?: { amount_discount?: number, amount_shipping?: number, amount_tax?: number } } } ``` ### 応答形式 エンドポイントは、次の形式で `200` HTTP 応答を返す必要があります。 ```typescript { manual_approval_details: { type: "approved" | "declined", declined?: { reason: string } }, // Connect only: set an application fee for the transaction application_fee_details?: { application_fee_amount: number, transfer_data?: { amount?: number, } } } ``` ## Optional: 決済カスタマイズフックを設定する デフォルトでは、Stripe は[商品カタログ](https://docs.stripe.com/agentic-commerce/product-feed.md)に定義されているオプションに基づいて、商品の税金と配送オプションを計算します。 税金または配送オプションとコストをロジックで動的に計算するには、以下のようにします。 1. ダッシュボードの [Agentic コマース設定](https://dashboard.stripe.com/settings/agentic-commerce)ページでエンドポイントを指定します。 1. **カスタム税率**または**カスタム配送オプション**を有効にします。 1. エンドポイントにロジックを実装し、以下のリクエストとレスポンスの形式を使用します。 ### リクエスト形式 Stripe はエンドポイントに次のリクエストを送信します。 ```typescript { type: "v1.delegated_checkout.customize_checkout", id: string, livemode: boolean, // Connected account ID context?: string, // Request specific data data: { // Used by the seller to determine whether they can set manual tax rates on line items automatic_tax: { enabled: boolean, }, currency: string, line_item_details?: Array<{ id: string, sku_id: string, unit_amount: number, amount_discount: number, amount_subtotal: number, amount_tax: number, amount_total: number, quantity: number, name: string, tax_rates: Array<{ rate: { id: string, display_name: string, percentage: number, inclusive: boolean, } // Amount of tax applied for this rate. amount: number }> }>, shipping_details?: { // Same as the shipping rate object described at https://docs.stripe.com/api/shipping_rates/object#shipping_rate_object shipping_rate?: { id: string, display_name?: string, metadata?: Map, tax_code?: string , tax_behavior: 'unspecified' | 'included' | 'excluded', fixed_amount: { amount: number, currency: 'usd' | 'cad' | etc., currency_options.: { amount: number, tax_behavior: 'unspecified' | 'included' | 'excluded', } }, delivery_estimate?: { maximum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number }, minimum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number } } }, // Same as the shipping rate object described at https://docs.stripe.com/api/shipping_rates/object#shipping_rate_object shipping_rates?: Array<{ id: string, display_name?: string, metadata?: Map, tax_code?: string, tax_behavior: 'unspecified' | 'included' | 'excluded', fixed_amount: { amount: number, currency: 'usd' | 'cad' | etc., currency_options.: { amount: number, tax_behavior: 'unspecified' | 'included' | 'excluded', } }, delivery_estimate?: { maximum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number }, minimum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number } } }, address?: { line1?: string, line2?: string, city?: string, state?: string, postal_code?: string, country?: string } }, amount_total?: number, amount_subtotal?: number, total_details?: { amount_discount?: number, amount_shipping?: number, amount_tax?: number } } } ``` ### 応答形式 エンドポイントは、次の形式で `200` HTTP レスポンスを返す必要があります。 ```typescript { shipping_options?: Array<{ // ID of the shipping rate, or data provided to create the shipping rate. Only provide one; not both shipping_rate?: string, shipping_rate_data: { display_name?: string, fixed_amount: { amount: number, currency: 'usd' | 'cad' | etc., }, metadata?: Map, tax_code?: string , tax_behavior?: 'unspecified' | 'included' | 'excluded', // Same as the shipping rate object described at https://docs.stripe.com/api/shipping_rates/create#create_shipping_rate-delivery_estimate delivery_estimate?: { maximum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number }, minimum: { unit: 'business_day' | 'day' | 'hour' | 'month' | 'year', value: number } } }, }>, line_items?: Array<{ // Corresponding ID of the line item to update id: string, // List of tax rates to apply to this line item // Provide either `rate` or `rate_data` tax_rates: Array<{ // ID of a v1 tax rate rate?: string, // Or `rate_data`. // This will use an existing tax rate that matches the params or will create one if a matching rate does not exist rate_data?: { display_name: string, inclusive: boolean, // percentage out of 100 percentage: number, } }, }> } ``` ## Optional: フックをテストする `POST` メソッドでフックリクエストを受け付けられる、一般にアクセス可能なエンドポイントを提供することで、注文承認または決済のカスタマイズフックをテストできます。エンドポイント関数を設定して、以下を行います。 1. JSON ペイロードで `POST` リクエストを処理する 1. 成功ステータスコード (`200`) を返す ローカル開発では、[ngrok](https://ngrok.com/) などのトンネリングツールを使用してローカルエンドポイントを公開します。 ### エンドポイントの例 このコードスニペットは、`v1.delegated_checkout.finalize_checkout` リクエストを受信し、`200` レスポンスを返すように設定されたエンドポイント関数です。 #### Ruby ```ruby require 'json' require 'sinatra' require 'stripe' set :port, 4242 # Replace with your endpoint's secret from your webhook settings endpoint_secret = 'whsec_...' # Using Sinatra post '/hooks' do payload = request.body.read sig_header = request.env['HTTP_STRIPE_SIGNATURE'] # Verify the webhook signature begin Stripe::Webhook::Signature.verify_header( payload, sig_header, endpoint_secret ) rescue Stripe::SignatureVerificationError => e status 400 return end # Handle the payload payload = JSON.parse(payload) case payload['type'] when 'v1.delegated_checkout.finalize_checkout' # Check inventory and accept payment data = { manual_approval_details: { type: 'approved' } } end status 200 body data.to_json end ``` ## Optional: 増分インベントリ更新を送信する 商品データのアップロードに加えて、Inventory Feed API を使用して個別の商品在庫の更新を送信します。商品データのアップロードと同じアップロードプロセスを使用しますが、`standard_data_format` を `inventory_feed` に設定します。 ```curl # 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" \ -u <>: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="inventory_feed" ``` ## Optional: 価格の増分更新を送信 商品データをアップロードし、Price Feed API を通じて個別の価格更新を送信してください。商品データアップロードと同じアップロードプロセスを使用し、`standard_data_format` を `price_feed` に設定してください。 ```curl # 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" \ -u <>: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="price_feed" ``` ## Optional: 返金および不審請求の申し立ての処理 決済が成功した後に顧客がウェブサイトまたは顧客サービスを通じて注文をキャンセルした場合は、返金を開始します。すでに Checkout Sessions API または PaymentIntents API を使用している場合は、エージェントによる決済を変更することなく既存の返金フローが機能します。返金と不審請求の申し立ては、ダッシュボードの [取引ページ](https://dashboard.stripe.com/payments) で管理することも、[Refunds API](https://docs.stripe.com/api/refunds.md) を使用してプログラムで処理することもできます。 ## See also - [Shared Payment Token](https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens.md)