Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Payments
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Beyond payments
Incorporate your company
Crypto
Agentic commerce
    Overview
    Build your checkout flow for agentic commerce
    Testing
    Integrate the Agentic Commerce Protocol
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United States)
HomePaymentsAgentic commerce

TestingPrivate preview

Learn how to test the processing of shared payment tokens (SPTs).

After you create a granted SharedPaymentToken object using a PaymentMethod, you can test the functionality of SPTs in an agent by using the token to create a PaymentIntent.

Create a Shared Payment Token

To grant your account an SPT using a PaymentMethod, you can collect payment details directly from the buyer or use a test PaymentMethod. The following code example demonstrates an agent issuing an SPT and sharing it with you.

Create and confirm a PaymentIntent

Next, create a PaymentIntent using the SharedPaymentToken object. The following code example demonstrates how you, as the seller, use the SharedPaymentToken object to create a payment.

Listen for webhook events

As the seller, you can listen for usage events related to the SPT to track its use during transactions. The following event notifies you when the SPT has been used.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc