Stripe Shared Payment Tokens
Module: Magenx_StripeSharedPaymentTokens · requires the official Stripe module (stripe/module-payments) · no GraphQL changes
When an AI agent such as ChatGPT checks out through the storefront’s Agentic Commerce Protocol (ACP) API, it can’t run Stripe’s browser code. It hands over a Stripe Shared Payment Token (spt_…) instead. The official Stripe module doesn’t know how to charge one. This module teaches it, inside Magento’s normal order placement.
How it works
Section titled “How it works”- Only the payment confirmation changes. The order, invoice, refunds and webhooks stay in Magento and the Stripe module.
- Every other checkout (normal, Express Checkout, subscriptions, admin) is untouched.
- A shared token can’t be saved for later, so the card is never stored.
- If the feature is off for the store, a shared token is refused before anything reaches Stripe.
Set up
Section titled “Set up”- Enable Agentic Commerce on your Stripe account.
- Install the module, then enable it in Stores > Configuration > Sales > Payment Methods > Stripe Shared Payment Tokens.
- On the storefront, set
ACP_SHARED_PAYMENT_TOKENS=1. Until then the ACP API refusesspt_…tokens itself.
Install
Section titled “Install”composer require magenxcommerce/module-stripe-shared-payment-tokensbin/magento module:enable Magenx_StripeSharedPaymentTokensbin/magento setup:upgradebin/magento setup:di:compile # production mode onlybin/magento cache:flush- PHP
~8.4.0||~8.5.0, Magento 2.4.8. - Source code of
Magenx_StripeSharedPaymentTokens: github.com/magenxcommerce/module-stripe-shared-payment-tokens
Upgrading from the old name
Section titled “Upgrading from the old name”This module used to be called StripeIntegration_SharedPaymentTokens. Settings carry over. Remove the old module, install this one, and delete any StripeIntegration_SharedPaymentTokens line left in app/etc/config.php before running setup:upgrade.
Configuration
Section titled “Configuration”Stores > Configuration > Sales > Payment Methods
Stripe Shared Payment Tokens (agentic checkout)
| Setting | Default | Scope | Notes |
|---|---|---|---|
Enabledpayment/ | No | Store view | Yes/No. Lets an AI agent platform pay for an order with a Stripe Shared Payment Token (spt_…) passed as the Stripe payment method. When off, an order carrying one is refused before anything is charged. Requires Agentic Commerce to be enabled on the Stripe account. |
Stripe API version for token paymentspayment/ | 2026-09-30.preview | Store view | Text. Shown when Enabled = Yes. Stripe-Version used only while confirming a payment made with a shared payment token (they are a preview API). Every other Stripe call keeps the Stripe module's own version. |