Accéder directement au contenu
Créez un compte
ou
connecter-vous
Logo de la documentation Stripe
/
Demander à l'assistant IA
Créez un compte
Connectez-vous
Démarrer
Paiements
Revenus
Plateformes et places de marché
Gestion de fonds
Ressources pour les développeurs
Aperçu
À propos des paiements Stripe
Mettre votre intégration à niveau
Analyses des paiements
Paiements en ligne
PrésentationTrouver votre cas d'usageUtiliser Managed Payments
Utiliser Payment Links
Utiliser une page de paiement préconfiguré
Créer une intégration personnalisée avec Elements
Développer une intégration dans l'application
Moyens de paiement
Ajouter des moyens de paiement
Gérer les moyens de paiement
Paiement accéléré avec Link
Interfaces de paiement
Payment Links
Checkout
Elements pour le web
Paiements dans l'application
Scénarios de paiement
Gérer plusieurs devises
Tunnels de paiement personnalisés
Acquisition flexible
Orchestration
Paiements par TPE
Terminal
Au-delà des paiements
Constituez votre entreprise
Cryptomonnaies
Commerce agentique
    Présentation
    Build your checkout flow for agentic commerce
      Process payment credentials from an agent
    Tests
    Integrate the Agentic Commerce Protocol
Financial Connections
Climate
Comprendre la fraude
Radar pour la protection contre la fraude
Gestion des litiges
Vérifier l'identité
AccueilPaiementsAgentic commerceBuild your checkout flow for agentic commerce

Remarque

Cette page n'est pas encore disponible dans cette langue. Nous faisons tout notre possible pour proposer notre documentation dans davantage de langues et nous vous fournirons la version traduite dès qu'elle sera disponible.

Process payment credentials from an agentVersion bêta privée

Learn how to create and use a SharedPaymentToken.

To receive payments facilitated by an application or AI agent, you need a secure mechanism to handle payment details collected by the agent and sent to you, the seller.

A Shared Payment Token is a limited reference to a PaymentMethod that’s stored in the agent’s Stripe account. An agent creates and shares a Shared Payment Token with a seller. They have usage limits and expiry windows, and never reveal PANs or other raw credentials. You can use Shared Payment Tokens directly in PaymentIntent flows, and outside of Stripe through virtualization.

Create a SharedPaymentToken

To create a SharedPaymentToken object, the agent first collects payment details from the buyer.

When you create a SharedPaymentToken, you issue a scoped grant of a PaymentMethod for use by a seller. You can specify options such as the currency, maximum amount, and expiry window.

curl https://api.stripe.com/v1/shared_payment/issued_tokens \ -u "key:" \ -d payment_method={{PAYMENT_METHOD_ID}} \ -d "usage_limits[currency]"=usd \ -d "usage_limits[max_amount]"=10000 \ -d "usage_limits[expires_at]"=time_in_future \ -d "seller_details[network_id]"={{NETWORK_ID}} \ -d "seller_details[external_id]"={{EXTERNAL_ID}}

Usage limits

Use the usage_limits parameter to specify the maximum amount and expiry window, then set the maximum amount to match the total amount of the transaction.

Seller details

Use the seller_details parameter to scope the Shared Payment Token to you or another seller.

  • network_id: The seller’s Business Network ID.
  • external_id: An optional identifier you can specify to link the Shared Payment Token to a specific seller, cart, or other identifier. For example, a Connect platform might use the external_id to scope the Shared Payment Token to a specific seller.

Payment method

Use the payment_method parameter to specify the PaymentMethod you want to use.

Use a SharedPaymentToken

After you receive the SharedPaymentToken from the agent, you can use it to create a PaymentIntent and complete the payment.

curl https://api.stripe.com/v1/payment_intents \ -u "key:" \ -d amount=10000 \ -d currency=usd \ -d shared_payment_token=spt_123

When you confirm a PaymentIntent this way, the payment_method field automatically populates with a new PaymentMethod that’s reproduced from the one originally used by the buyer to create the Shared Payment Token. The replication process only transfers non-sensitive data, such as card and billing details, and excludes business-specific information such as metadata, customer data, previous addresses, and CVC check results.

All subsequent events, such as refunds and reporting, operate as if you had directly provided the PaymentMethod.

You can retrieve details about the Shared Payment Token you have been granted by the agent. You can view limited information about the underlying payment method (for example, card brand or the last 4 digits). The Shared Payment Tokens that you have been granted also include details on usage limits and may also include risk details.

curl https://api.stripe.com/v1/shared_payment/granted_tokens/{id}

Risk types

The following table provides risk details about the Shared Payment Tokens that the agent has granted you. Review this information to determine if you need to create a payment.

Risk typeDescriptionScore typeRecommendation
Fraudulent disputeLikelihood that the credential results in a fraudulent dispute.Integerblock or continue
Card testingLikelihood that the credential is card testing.Floatblock or continue
Stolen cardLikelihood that the credential is a stolen card.Integerblock or continue
Card issuer declineLikelihood that the card issuer declines the transaction.Floatblock or continue
BotLikelihood that the credential is being used by a bot.Floatblock or continue

Webhooks

When the seller uses a Shared Payment Token to process a payment, Stripe sends events to the seller and the agent.

EventDescriptionUse case
shared_payment.issued_token.usedThe agent receives this event when you use the Shared Payment Token.Listen for this event to notify the buyer that the payment has been processed.
shared_payment.granted_token.usedYou receive this event when the Shared Payment Token has been used.Listen for this event to confirm that the Shared Payment Token has been use.

Revoke a SharedPaymentToken

The agent can revoke a Shared Payment Token at any time. This prevents the seller from using it to create a payment.

curl -X POST https://api.stripe.com/v1/shared_payment/spt_123/revoke \ -u "key:"

Webhooks

Stripe sends events to the seller and the agent when the agent revokes or expires a Shared Payment Token.

EventDescriptionUse case
shared_payment.issued_token.usedThe Shared Payment Token has been used. Event sent to agent.Listen for this event to notify the buyer that the payment has been processed.
shared_payment.granted_token.usedThe Shared Payment Token has been used. Event sent to the seller.Listen for this event to confirm that the Shared Payment Token has been used.
Cette page vous a-t-elle été utile ?
OuiNon
  • Besoin d'aide ? Contactez le service Support.
  • Rejoignez notre programme d'accès anticipé.
  • Consultez notre log des modifications.
  • Des questions ? Contactez l'équipe commerciale.
  • LLM ? Lire llms.txt.
  • Propulsé par Markdoc