| [ Web Proxy ] |
| Viewing: https://docs.stripe.com/agentic-commerce/for-sellers/custom | [Back] [Original] |
Agentic Commerce Suite (ACS) is available in the US. Use this integration if you want to build your own checkout API endpoints and process agentic payments with a third-party payment processor. To request access and onboard your endpoint, join the waitlist.
Use Agentic Commerce Suite (ACS) to sell your products through agents with a single integration. To build a custom integration with ACS and process payments with a third-party processor, implement a reverse API that defines the requests Stripe sends to your commerce backend and the response shapes your backend returns. When an agent routes a checkout request through Stripe, Stripe calls these endpoints on your behalf.
This lets you sell products through agents with a single integration and avoid per-agent configuration. After the agent finalizes the checkout flow, resolve the shared payment token (SPT) that you received from the agent into credentials and process the payment with your third-party processor.
After Stripe onboards your custom endpoint, go to Agentic Commerce in the Stripe Dashboard. This flow guides you through creating a Stripe profile and requesting onboarding for the agents you want to use.
We recommend that you use Blueprints in Workbench to test receiving reverse API requests in your sandbox:
UpdateSession reverse API request with an invalid shipping address to verify that your error validation messages display correctly.CompleteSession reverse API request with specific payment data to verify your order creation logic.You can configure request payloads, including custom line items, buyer details, fulfillment addresses, and other fields, to match your test cases. Before you go live, confirm that your checkout flow updates as expected, your shipping calculations are accurate, and payment confirmation completes successfully.
When youre ready to sell your products through an agent, review the agent terms and request onboarding for the agent in the Dashboard. Stripe sends the agent an approval request that the agent must accept. To pause or stop selling through the agent, disable the agent in the Dashboard.
When a customer indicates that they want to place an order, the agent sends you a checkout request. Process the request and return the current checkout flow so the agent can show the customer details such as the total and available options such as shipping methods. If any required information is missing, the checkout flow remains incomplete.
POST api.seller.com/agentic/checkouts { created: Timestamp, currency: "usd", // currently limited to single item checkouts line_items: [ { sku_id: "sku_123", quantity: 2 } ], buyer: { first_name: "John", last_name: "Doe", email: "john.doe@example.com", phone_number: "+1234567890" }, fulfillment_details: { contact: { name: "Jane Doe", email: "jane.doe@example.com", phone_number: "+14155552671" }, address: { "line_one": "123 Main St", "line_two": "Apt 4B", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" } }, agent_details: { network_profile: "profile_agent", // agent's Stripe provided unique id display_name: "Agent" } }
Agents can update a checkout flow to change items, select fulfillment options, or update addresses. After each update, recalculate totals and confirm inventory availability. When the checkout includes all required information, mark it as ready_for_payment.
POST api.seller.com/agentic/checkouts/:id { fulfillment_option_id?: "ship_express_001", // updated shipping option }
When the agent confirms the checkout, Stripe calls your confirmation endpoint with payment data. Your endpoint must handle three steps: receive the SPT, use it to retrieve payment credentials, and record the payment with your processor.
When the agent collects the buyers payment information and confirms the checkout, your confirmation hook receives an SPT. The SPT is a scoped grant of the customers payment method from the agent to your Stripe profile with specific usage and expiration limits.
POST api.seller.com/agentic/checkouts/:id/confirm { payment_data: { token: "spt_123", // Stripe SharedPaymentToken ID provider: "stripe", billing_address?: { // optional line1?: string, city?: string, state?: string, postal_code?: string, country?: string } }, risk_details: { client_device_metadata_details: { user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" ip_address: 1.2.3.4 } } }
Use SPT resolve to retrieve network credentials and submit them to your payment processor.
curl --request POST \ --url https://api.stripe.com/v1/shared_payment/granted_tokens/:id/resolve \ --header 'Authorization: Bearer sk_XXX' \ --header 'Content-Type: application/x-www-form-urlencoded'
The credential type appears in payment_method_details.credentials.type and is either agentic_token or dpan.
In collaboration with the card networks, Stripe might use tokens issued through network programs such as Mastercards Agent Pay and Visas Intelligent Commerce programs on your behalf. Stripe submits the requested data to the card networks to provision and process those tokens for related transactions.
{ id: "spt_123", object: "shared_payment.granted_token", created: 1782172800, deactivated_at: null, deactivated_reason: null, livemode: true, shared_metadata: {}, payment_method_details: { type: "card", card: { credentials?: { type: "dpan" || "agentic_token", // if type is agentic_token agentic_token?: { number?: string, exp_month?: string, exp_year?: string, cryptogram?: { value: string, type: "CAVV" | "TAVV" | "DCVV", eci?: string }, encrypted?: { encryption_type: "RSA", encryption_block: string, encryption_block_fields: string, key_id: string } }, // if type is dpan dpan?: { number?: string, exp_month?: string, exp_year?: string, cryptogram?: { value: string, type: "CAVV" | "TAVV" | "DCVV", eci?: string }, encrypted?: { encryption_type: "RSA", encryption_block: string, encryption_block_fields: string, key_id: string } } }, brand: "visa", country: "US", display_brand: "visa", exp_month: 9, exp_year: 2029, fingerprint: "dyRcYjZNxnHpC51l", funding: "credit", last4: "5627", networks: { available: ["visa"], preferred: null }, wallet: null } }, usage_details: { amount_captured: { value: 1000, currency: "usd" } }, usage_limits: { currency: "usd", expires_at: 1798761600, max_amount: 10000 }, agent_details: { name: string, network_business_profile: "profile_1234" } }
After you capture the payment with your processor, record a payment and confirm the checkout flow.
curl https://api.stripe.comv1/payment_records/report_payment \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "payment_method_details[shared_payment_granted_token]=spt_123" \ -d "amount_requested[value]=1000" \ -d "amount_requested[currency]=usd" \ -d initiated_at=1782172800 \ -d outcome=guaranteed \ -d "guaranteed[amount][value]=1000" \ -d "guaranteed[amount][currency]=usd" \ -d "guaranteed[final_capture]=true" \ -d "guaranteed[guaranteed_at]=1782172800" \ -d "processor_details[type]=custom" \ -d "processor_details[custom][payment_reference]=auth_order_id_1"
{ // status must be in_progress or completed, or you must return an error status: "in_progress" | "completed", order: { id: string, permalink_url: string, }, metadata?: Hash }
When an agent retrieves the latest checkout state, Stripe sends you the full current checkout state, and you respond with any changes to that state. If nothing has changed, you can return the current state without making any updates.
GET api.seller.com/agentic/checkouts/:id
| Web Proxy Viewer | New URL | Original Page |