Ir a contenido
Crea una cuenta o inicia sesión
Logotipo de la documentación de Stripe
/
Pregúntale a la IA
Crear cuentaIniciar sesión
Empezar
Pagos
Ingresos
Plataformas y marketplaces
Gestión del dinero
Recursos para desarrolladores
API y SDKAyuda
Resumen
Empieza a usar Connect
Diseñar tu integración
    Guía interactiva de la plataforma
    Plataforma de SaaS
      Inicio rápido
      Tareas esenciales
        Crear una cuenta conectada
        Configura el acceso al Dashboard
        Hacer el onboarding en una cuenta conectada
        Aceptar un pago
        Cobrar comisiones de la plataforma
        Cobrar comisiones por servicio
        Transferir a cuentas conectadas
        Gestiona los reembolsos y las disputas
        Habilitar la compra contextual en agentes de IA
    Marketplace
Fundamentos de la integración
Integraciones de ejemplo
Gestión de cuentas
Haz el onboarding de las cuentas
Configura los Dashboards de la cuenta
Funcionalidades y requisitos de información
Trabaja con tipos de cuentas conectadas
Procesamiento de pagos
Aceptar pagos
Transferir a cuentas
Administración de la plataforma
Gestiona tu plataforma Connect
Formularios fiscales para tu plataforma Connect
Estados Unidos
Español (España)
InicioPlataformas y marketplacesDesign your integrationSaaS platformEssential tasks

Enable in-context shopping on AI agentsVersión beta privada

Learn how to let your businesses sell their products on AI chat agents.

Versión beta privada

If you’re interested in using agentic commerce to sell your businesses’ products through AI agents, including Instant Checkout in ChatGPT, or to manage transactions between buyers and businesses, join the waitlist.

Upload your product catalog data to Stripe

Prepare your product catalog

For each connected account, create a CSV file that conforms to the Stripe product catalog specification.

Upload the catalog data to Stripe

Upload catalog data for each connected account separately through the Stripe APIs. You can send updates every 15 minutes.

Use the sandbox to validate parsing, field mappings, and data quality before enabling live updates.

First, upload a connected account’s product catalog CSV using the Files API. A successful request returns a File object, which includes the id.

  • Specify data_management_manual_upload as purpose.
  • Make sure the MIME type matches the file format. Acceptable formats include CSV and TSV, where each row represents one product or variant.
  • The maximum file size is 200 MB.
Command Line
curl https://files.stripe.com/v1/files \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" \ -F purpose=data_management_manual_upload \ -F file="@/path/to/your/file.csv;type=text/csv"

Then, use the Data Management API to create an ImportSet. This call starts catalog processing and makes the data available in the Dashboard. Include the following:

  • The file id returned
  • The preview header (for example,Stripe-Version: 2025-09-30.clover;udap_beta=v1)
Command Line
curl https://api.stripe.com/v1/data_management/import_sets \ -H "Stripe-Version: 2025-09-30.clover;udap_beta=v1" \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="product_catalog_feed"

Monitor feed status

Stripe validates and cleans the catalog data, indexes it, and converts it to a format for AI agents. Monitor indexing progress using the status field on the import set. The status can be pending, failed, succeeded, succeeded_with_errors, pending_archive, or archived.

Command Line
curl https://api.stripe.com/v1/data_management/import_sets/{{IMPORT_SET_ID}} \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"

The response includes the status and any errors:

{ "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" }

If your import status is succeeded_with_errors, you can download the error report:

  1. Find the result.errors.file field in the response.
  2. Use the Files API to retrieve the error file by its ID.
  3. The downloaded CSV contains your original data with a leading column named stripe_error_message that describes why each row failed.
Command Line
curl https://files.stripe.com/v1/files/{{ERROR_FILE_ID}}/contents \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:

The API returns a CSV file containing only the rows that failed, with a stripe_error_message column describing each error.

Enable agents for your connected accounts

Stripe offers an embedded component to help onboard connected accounts to agentic commerce. When you’re ready for your connected accounts to sell on an AI chat agent, they must review the agent terms and enable the agent using this embedded component. Stripe sends the agent an approval request that the agent must accept. The component lets connected accounts manage which AI agents can sell their products, customize how their business appears across agent platforms, and pause or stop selling on an AI chat agent.

Versión beta privada

We’re actively developing this embedded component. The code snippets are for illustrative purposes only and are subject to change.

The following code example shows how your platform can integrate with this embedded component. For details on how to embed dashboard functionality into your website, see Get started with Connect embedded components.

// server.js const stripe = require("stripe")(
'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
, { apiVersion: ${STRIPE_API_VERSION}} ); // POST /account_session_token const accountSession = await stripe.accountSessions.create({ account: '{{CONNECTED_ACCOUNT_ID}}', components: { agentic_commerce_settings: { enabled: true, }, }, }, { apiVersion: `${STRIPE_API_VERSION}; embedded_connect_beta=v2`, }); response.json({ accountSessionToken: accountSession.client_secret });
// App.jsx import { ConnectAgenticCommerceSettings, ConnectComponentsProvider, } from "@stripe/react-connect-js"; import { loadConnectAndInitialize } from "@stripe/connect-js"; const AgenticCommerce = () => { const [stripeConnectInstance] = React.useState(() => { const fetchClientSecret = async () => { const response = await fetch('/account_session', { method: "POST" }); if (!response.ok) { const {error} = await response.json(); console.log('An error occurred: ', error); return undefined; } else { const {client_secret: clientSecret} = await response.json(); return clientSecret; } }; return loadConnectAndInitialize({ publishableKey: "pk_123", fetchClientSecret: fetchClientSecret, }) }); return ( <div> <ConnectComponentsProvider connectInstance={stripeConnectInstance}> <ConnectAgenticCommerceSettings /> </ConnectComponentsProvider> </div> ) }

Respond to purchases and fulfill orders

Listen to Stripe webhooks to monitor orders made on AI chat agents.

When an order is confirmed, Stripe emits webhook events that your server can handle to run fulfillment logic. Set up an endpoint on your server to accept, process, and acknowledge these events. See the webhooks guide for step-by-step instructions on integrating with and testing Stripe webhooks.

Stripe emits checkout.session.completed and payment_intent.succeeded. If your fulfillment logic already handles these events, you don’t need additional integration changes. You can customize your fulfillment logic for in-context agentic selling (for example, by noting in your order confirmation email that the checkout occurred through an agent).

For details on setting up webhooks for connected accounts, see Connect webhooks.

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; // For V1 webhooks event.account is the connected account fulfillCheckout(event.account, session.id); } response.status(200).send(); });

After you receive the webhook, retrieve all required fields with a single API call. To avoid multiple requests, expand sub-resources using the expand request parameter with the preview header Stripe-Version: 2025-12-15.preview.

Command Line
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
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -H "Stripe-Version: 2025-12-15.preview" \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"

See fields in the expanded Checkout Session, such as amount_total, quantity, and SKU ID.

Checkout session field reference

Order fieldAvailable resourceAPI path
Order dateCheckoutSession.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.created
Order quantityCheckoutSessionsCheckoutSession.LineItems.Data[].quantity
SKUCheckoutSessionsCheckoutSession.LineItems.Data[].price.external_reference
Product descriptionCheckoutSessionsCheckoutSession.LineItems.Data[].price.product.description
Unit priceCheckoutSessionsCheckoutSession.LineItems.Data[].price.unit_amount
Tax amountCheckoutSessionsCheckoutSession.LineItems.Data[].Taxes[].amount
Tax typeCheckoutSessionsCheckoutSession.LineItems.Data[].Taxes[].Rate.tax_type
Tax rateCheckoutSessionsCheckoutSession.LineItems.Data[].Taxes[].Rate.percentage
ShippingAddressCheckoutSessionsCheckoutSessions.CollectedInformation.shipping_details
BillingAddressCheckoutSessions.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.billing_details
Last4CheckoutSessions.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.last4
ExpMonthCheckoutSessions.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.exp_month
ExpYearCheckoutSessions.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.exp_year
CreditCardTypeCheckoutSessions.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.payment_method_details.card.brand
Final amountCheckoutSessionsCheckoutSessions.amount_total
GTIN Private previewCheckoutSessionsCheckoutSession.LineItems.Data[].price.product.identifiers.gtin
MPN Private previewCheckoutSessionsCheckoutSession.LineItems.Data[].price.product.identifiers.mpn
Agent details Private previewCheckoutSession.PaymentIntentCheckoutSessions.PaymentIntent.agent_details
OrderNoCheckoutSession.PaymentIntent.LatestChargeCheckoutSessions.PaymentIntent.LatestCharge.receipt_number

Test your integration

You can test your integration directly from the Dashboard in a sandbox:

  1. Open the Trigger Agentic Purchase blueprint in Workbench
  2. Enter the connected account’s ID and a SKU ID
  3. Click Run to simulate a charge from an agent

OpcionalManual capture

By default, Stripe captures payments immediately when a purchase completes. Contact stripe to enable manual capture. After it’s enabled, call the capture method on the PaymentIntent returned in the webhook described in the previous section.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl -X POST https://api.stripe.com/v1/payment_intents/pi_3MrPBM2eZvKYlo2C1TEMacFD/capture \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

OpcionalSet up checkout customization hook

Use the following hooks to customize your Checkout Session:

  • customize_checkout: Customize shipping options and taxes for the Checkout Session.
  • finalize_checkout: Customize the application fee for the Checkout Session, and optionally manually approve or reject the session.

Contact Stripe to register your URL for these hooks. Use the request’s type field to differentiate the type of customization.

View the request format for customize_checkout:

{ 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: float, 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<string,string>, tax_code?: string , tax_behavior: 'unspecified' | 'inclusive' | 'exclusive', fixed_amount: { amount: number, currency: 'usd' | 'cad' | etc., currency_options.<currency>: { amount: number, tax_behavior: 'unspecified' | 'inclusive' | 'exclusive', } }, 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<string,string>, tax_code?: string, tax_behavior: 'unspecified' | 'included' | 'excluded', fixed_amount: { amount: number, currency: 'usd' | 'cad' | etc., currency_options.<currency>: { 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 } } }

Response format for customize_checkout

{ 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<string,string>, 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: float, } }, }>, }

Request format for finalize_checkout

{ type: "v1.delegated_checkout.finalize_checkout", id: string, livemode: boolean, // Connected account ID context?: string, // Request specific data data: { currency: string, line_items_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: float, inclusive: boolean, } // Amount of tax applied for this rate. amount: number }> }>, 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" | ... } } }, billing_details?: { name?: string, address?: { line1?: string, line2?: string, city?: string, state?: string, postal_code?: string, country?: string } }, shipping_details?: { name?: string, address?: { line1?: string, line2?: string, city?: string, state?: string, postal_code?: string, country?: string }, }, email?: string, phone?: string, amount_total?: number, amount_subtotal?: number, total_details?: { amount_discount?: number, amount_shipping?: number, amount_tax?: number } } }

View the response format for finalize_checkout:

{ manual_approval_details?: { type: "approved" | "declined", declined?: { reason: string } }, application_fee_details?: { application_fee_amount: number, transfer_data?: { amount?: number, } } }

OpcionalHandle the agreement with agents

Versión beta privada

This API is in private preview. Examples below are subject to change.

When a connected account onboards to an agent, Stripe creates an Agreement object between the seller and the agent. Stripe emits webhook events to the platform and the agent whenever the Agreement object’s status changes:

  • v2.orchestrated_commerce.agreement.created: An Agreement was created between the seller and the agent.
  • v2.orchestrated_commerce.agreement.partially_confirmed: The seller has confirmed the Agreement.
  • v2.orchestrated_commerce.agreement.confirmed: The agent has confirmed the Agreement.
  • v2.orchestrated_commerce.agreement.terminated: Either the seller or agent terminated the Agreement.

Listen for these events on your webhook endpoint to keep your platform’s state in sync (for example, updating UI, enabling/disabling agent access, or notifying sellers).

Fetch an Agreement

Retrieve an Agreement object using the Agreements API:

Command Line
curl https://api.stripe.com/v2/orchestrated_commerce/agreements/{{AGREEMENT_ID}} \ -H "Authorization: Bearer {{API_KEY}}" \ -H "Stripe-Version: 2025-12-19-17.internal" \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"

OpcionalSend incremental inventory updates

In addition to uploading your product catalog, you can send individual product inventory updates using the Inventory Feed API. Use the same upload process as catalog uploads, but set standard_data_format to inventory_feed:

Command Line
# Step 1: Upload your CSV using the Files API curl https://files.stripe.com/v1/files \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" \ -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: ${STRIPE_API_VERSION};udap_beta=v1" \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
: \ -d file={{FILE_ID}} \ --data-urlencode standard_data_format="inventory_feed"

OpcionalHandle refunds and disputes

If you already use the PaymentIntents or Checkout Sessions API, your existing refunds and disputes integration doesn’t require changes for in-context agentic selling. PaymentIntents are still created for in-context agentic selling flows. As long as you associate the PaymentIntent ID with your order, your refunds and disputes integration continues to work.

After checkout succeeds, you can initiate a refund if a customer cancels the order from your website or through customer service. If you already use the Checkout Sessions or PaymentIntents API, your existing refund flow works without changes for in-context agentic selling.

Manage refunds and disputes without code in the Dashboard from the Transactions page.

To handle refunds programmatically, integrate with the Refunds API for post-checkout cancellation or refund requests.

¿Te ha sido útil la página?
SíNo
  • ¿Necesitas ayuda? Ponte en contacto con el equipo de soporte.
  • Echa un vistazo a nuestro registro de cambios.
  • ¿Tienes alguna pregunta? Ponte en contacto con el equipo de ventas.
  • ¿LLM? Lee llms.txt.
  • Con tecnología de Markdoc