Skip to main content
Version: 1.28 (Current)

Stripe

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Connectors, Stripe account

The Stripe add-on takes payments through Stripe. Its actions send the user to a Stripe-hosted Checkout page, save customers with a card on file, create plans and subscriptions, and handle Stripe webhook events. With Stripe Connect, they also connect sellers' Stripe accounts to your platform, so payments can go to a seller while your platform keeps a fee.

note

The add-on is installed separately as the DnnSharp.Stripe package, and needs the STRIPE feature in your license. If it isn't licensed, the actions fail with a "not licensed" error. If you don't see the Stripe actions or the Stripe connector type, the add-on isn't installed.

Choosing an action​

ActionWhat it doesUse it to
Stripe CheckoutSends the user to a Stripe-hosted Checkout page for a one-time payment or a subscription, then runs actions when Stripe's webhook confirms the payment. It supports SCA.Take a card payment for a cart, or sign a user up for a plan. This is the recommended way to take payments.
Stripe Create CustomerCreates a Stripe customer and saves the card from a Stripe Credit Card field as the default card. Returns the customer ID.Register a paying customer with a card on file, before you subscribe them.
Stripe Create PlanCreates a fixed-price plan, with a new or existing product. Returns the plan and product IDs.Create your membership plans from a setup form or workflow, instead of in the Stripe Dashboard.
Stripe Create SubscriptionSubscribes an existing customer to an existing plan, charged automatically or by invoice. Returns the subscription ID.Start a membership for a customer without sending them to Stripe.
Stripe Add SellerSends the user to Stripe to connect their Stripe account to your platform (Stripe Connect).Add a Connect with Stripe button to a seller sign-up form.
Get Stripe User AccountFinds a connected account's ID by its email.Get a seller's account ID before you send them a payment.
Stripe Get Event DetailsChecks that a webhook call comes from Stripe and gives you the event type and data as tokens.Handle subscription payments, cancellations, refunds or disputes in an API endpoint.
Stripe Payment with Token (not SCA compliant)Charges the card from a Stripe Credit Card field on your form, without SCA.Maintain existing forms. For new payments, use Stripe Checkout instead.
Stripe Direct Payment (unsafe - obsolete)Charges raw card details on a seller's connected account.Nothing new. Use Stripe Checkout instead.
Stripe Payment through the platform (unsafe - obsolete)Charges raw card details on your platform account and transfers the money to a seller.Nothing new. Use Stripe Checkout instead.
Add Stripe ConnectorCreates a Stripe connector that stores your secret key, encrypted, and can save its ID in a token.Let each customer or tenant save its own Stripe account from a setup form.
Update Stripe ConnectorReplaces the title and secret key of an existing Stripe connector. An empty field clears the saved value.Save a new key after you roll it in Stripe, or switch from a test key to a live key.

On Stripe or on your site?​

  • On Stripe (Stripe Checkout). The user enters the card on Stripe's page, so card details never reach your server, and Stripe handles Strong Customer Authentication (SCA), such as 3D Secure. It works on form and listing buttons only.
  • On your form, with a Stripe Credit Card field (Stripe Create Customer and Stripe Payment with Token). The field sends the card from the browser to Stripe and gets back a one-time token, so only the token reaches your server. There's no SCA, so cards that need authentication, such as many European cards, may be declined. A token can only be used once, so don't use the same field in two Stripe actions in one submission. These actions work in Forms only.
  • Raw card fields (the two obsolete actions). The card number, CVC and expiry pass through your server, which puts your site in scope for PCI card-data rules, and there's no SCA. Don't use them in new applications.

Keys, test mode and amounts​

  • Secret key. Stripe Checkout, Stripe Create Customer, Stripe Create Plan, Stripe Create Subscription and Stripe Payment with Token read the secret key from a Stripe connector. Create it on the Connectors page or with Add Stripe Connector, and change it with Update Stripe Connector. Neither action checks the key with Stripe, and Test Connector doesn't support Stripe connectors. Stripe Add Seller, Get Stripe User Account and the two obsolete actions take the secret key as a parameter instead, so pass it with a token rather than typing it in. Stripe Get Event Details doesn't call Stripe and needs no key.
  • Publishable key. Stripe Checkout and the Stripe Credit Card field also need a publishable key. It must belong to the same Stripe account, and the same test or live mode, as the secret key.
  • Test mode. Use test keys (sk_test_... and pk_test_...) and Stripe's test cards first. Objects created in test mode, such as plans, don't exist in live mode, so create them again with your live key. Webhooks have a separate signing secret in each mode. Switch the keys and the signing secrets together when you go live.
  • Amounts. The actions don't all use the same unit. The Amount column of Stripe Checkout's items list and the amounts of the card payment actions are in the currency's main unit, for example 19.99. Stripe Create Plan's Amount and Stripe Checkout's Application Fee Amount are in the smallest unit, for example 999 for 9.99 USD. Zero-decimal currencies, such as jpy, need extra care. Check each action's page.

Saving IDs for later​

The actions are linked by the IDs Stripe returns, so save them with your user or order records:

  • The customer ID (cus_...) from Stripe Create Customer goes into Stripe Create Subscription, or into the Customer ID of a Stripe Checkout direct payment.
  • The plan ID (plan_...) from Stripe Create Plan goes into Stripe Create Subscription, or into the PlanId column of a Stripe Checkout subscription.
  • The subscription ID (sub_...) from Stripe Create Subscription, or read from the Checkout session, matches webhook events to your users.
  • The connected account ID (acct_...) comes from Get Stripe User Account after the seller connects with Stripe Add Seller. PAA doesn't store it. Pass it to Stripe Checkout's Transfer Destination or Stripe Create Subscription's Payment To.

There are no actions to change, pause or cancel a subscription, change a plan or refund a payment. Do these in the Stripe Dashboard.

Webhooks​

Stripe reports what happens after the user leaves your site with webhook events. There are two separate receivers, each with its own signing secret in the appSettings of web.config:

  • Stripe Checkout has a built-in endpoint for the checkout.session.completed event only. It runs the action's On Webhook Call list. Its secret goes in DnnSharpStripeApiSigningSecretKey.
  • Stripe Get Event Details goes first in your own API endpoint, for any other events, such as invoice.payment_succeeded or customer.subscription.deleted. Its secret goes in DnnSharpStripeEventApiSigningSecretKey.

Don't send checkout.session.completed to both. Fulfill orders from the webhook, not from the success page, and expect Stripe to send the same event more than once. Stripe Create Subscription treats a subscription whose first payment failed as a success, so use the invoice events to confirm payment before you give access.

For other payment providers, see the Authorize.Net and PayPal add-ons. For the general connector actions, see Connectors. For all add-ons, see Add-ons.

Revised 10/02/2026