Weiter zum Inhalt
Konto erstellen
oder
anmelden
Das Logo der Stripe-Dokumentation
/
KI fragen
Konto erstellen
Anmelden
Jetzt starten
Zahlungen
Umsatz
Plattformen und Marktplätze
Geldmanagement
Entwicklerressourcen
Übersicht
Informationen zu Stripe Payments
Aktualisieren Sie Ihre Integration
Zahlungsanalysefunktionen
Online-Zahlungen
ÜbersichtIhren Use case findenVerwenden Sie Managed Payments
Payment Links verwenden
Vorgefertigte Checkout-Seite verwenden
Erstellen Sie eine benutzerdefinierte Integration mit Elements
In-App-Integration erstellen
Zahlungsmethoden
Zahlungsmethoden hinzufügen
Zahlungsmethoden verwalten
Schnellerer Bezahlvorgang mit Link
Zahlungsschnittstellen
Payment Links
Checkout
Web Elements
In-App Zahlungen
Zahlungsszenarien
Umgang mit mehreren Währungen
Nutzerdefinierte Zahlungsabläufe
Flexibles Acquiring
Orchestrierung
Präsenzzahlungen
Terminal
Mehr als Zahlungen
Unternehmensgründung
Krypto
Agentenbasierter Handel
    Übersicht
    Build your checkout flow for agentic commerce
      Process payment credentials from an agent
    Tests
    Integrate the Agentic Commerce Protocol
Financial Connections
Climate
Betrug verstehen
Betrugsprävention von Radar
Zahlungsanfechtungen verwalten
Identitäten verifizieren
StartseiteZahlungenAgentic commerceBuild your checkout flow for agentic commerce

Notiz

Bis jetzt ist diese Seite noch nicht in dieser Sprache verfügbar. Wir arbeiten aber verstärkt daran, unsere Dokumentation in weiteren Sprachen bereitzustellen, und werden die Übersetzung sofort anzeigen, sobald diese verfügbar ist.

Process payment credentials from an agentPrivate Vorschau

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.
War diese Seite hilfreich?
JaNein
  • Benötigen Sie Hilfe? Kontaktieren Sie den Kundensupport.
  • Nehmen Sie an unserem Programm für frühzeitigen Zugriff teil.
  • Schauen Sie sich unser Änderungsprotokoll an.
  • Fragen? Sales-Team kontaktieren.
  • LLM? Lesen Sie llms.txt.
  • Unterstützt von Markdoc