Skip to main content
Version: 1.28 (Current)

Stripe Create Plan

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Connectors, Stripe

Creates a subscription plan in Stripe. A plan sets the price and the billing schedule, for example 9.99 USD every month. You then subscribe customers to it with Stripe Create Subscription.

Every plan belongs to a Stripe product. The action can create a new product for the plan, or add the plan to a product you already have. It returns the IDs of the new plan and its product.

The plan uses the per_unit billing scheme, so the amount is charged once per unit at the start of each billing period.

note

This action requires the Stripe feature (STRIPE) to be licensed. Stripe support is a separate add-on package (DnnSharp.Stripe). If you don't see the Stripe actions, the add-on isn't installed.

Typical Use Cases​

  • Create the plans for your membership levels from a setup form or workflow, instead of in the Stripe Dashboard
  • Let an administrator or a seller set their own price and billing schedule
  • Add a new price, for example a yearly option, to an existing product
  • Save the plan ID in your database, so later subscriptions can use it

Don't use it to​

  • Subscribe a customer. Use Stripe Create Subscription with the plan ID.
  • Take a one-time payment. Use Stripe Checkout.
  • Change or delete a plan. There's no action for this. Use the Stripe Dashboard.
  • Create a plan with tiers or metered usage. The action only creates fixed-price, per-unit plans.
Action NameDescription
Stripe Create SubscriptionSubscribes a Stripe customer to a plan.
Stripe Create CustomerCreates the Stripe customer to subscribe.
Stripe CheckoutTakes a one-time payment through Stripe Checkout.
Add Stripe ConnectorCreates the Stripe connector this action uses.
Update Stripe ConnectorChanges the secret key of a Stripe connector.
Run SQL QuerySaves the plan ID in your database.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
API ConnectorThe Stripe connector with the secret key to use. See Add Stripe Connector. When using an expression, the value must be the connector ID.YesnoneYes
AmountThe price for each billing period, as a whole number in the currency's smallest unit, for example 999 for 9.99 USD. Use 0 for a free plan.Yesempty stringYes
CurrencyThe three-letter ISO currency code, for example usd or eur. It must be a currency Stripe supports.Yesempty stringYes
IntervalHow often the customer is billed: Day, Week, Month or Year. Can be set with an expression that returns day, week, month or year, in lowercase.Yesempty stringYes
NicknameA short description of the plan, for example Gold - Monthly. It's shown in the Stripe Dashboard, not to customers.Yesempty stringNo
Interval CountThe number of intervals between payments. For example, Interval = Month and Interval Count = 3 bills every 3 months. The longest allowed is one year (1 year, 12 months or 52 weeks).Yes1No
Use Existing ProductWhen checked, the plan is added to the product in Product ID. When unchecked, a new product is created for the plan.NofalseNo
Product IDThe ID of an existing Stripe product, for example prod_.... The product must be of type service. Only shown when Use Existing Product is checked.Yesempty stringYes, with Use Existing Product
Product NameThe name of the new product. Customers can see it, for example on invoices. Only shown when Use Existing Product is unchecked.Yesempty stringYes, without Use Existing Product
Statement DescriptorThe text on the customer's card statement for the new product, up to 22 characters. It must contain at least one letter. Stripe shows it in capitals and removes non-ASCII characters. Only shown when Use Existing Product is unchecked.Yesempty stringNo
Product MetadataKey-value pairs to save with the new product, for example Level = Gold. A single key named DeleteMetadata saves no metadata. Only shown when Use Existing Product is unchecked.Yesempty listNo
Default Trial Period DaysThe number of free trial days saved on the plan. See Trials.Yesempty stringNo
On SuccessActions that run after Stripe creates the plan.Noempty listNo
On ErrorActions that run when Stripe rejects the request. The reason is in [Stripe:ErrorMessage].Noempty listNo

Output Parameters Reference​

The tokens are set before On Success or On Error runs.

ParameterDescription
[Stripe:PlanId]The ID of the new plan, created by Stripe, for example plan_.... Pass it to Stripe Create Subscription.
[Stripe:ProductId]The ID of the plan's product, for example prod_.... It's the new product's ID, or your Product ID if you used an existing product.
[Stripe:ErrorMessage]The error message from Stripe, when the request fails.

What happens when it runs​

  1. The action checks Interval, and checks that Product ID or Product Name has a value. If Statement Descriptor is longer than 22 characters, it fails too. These checks raise an error right away. On Error doesn't run for them.
  2. It sends the plan to Stripe with the connector's secret key. If Use Existing Product is unchecked, Stripe creates the product in the same request.
  3. On success, it sets [Stripe:PlanId] and [Stripe:ProductId] and runs On Success.
  4. If Stripe rejects the request, for example because of an unsupported currency or a wrong product ID, it sets [Stripe:ErrorMessage] and runs On Error. If On Error is empty, the action raises the error instead.

Trials​

Default Trial Period Days is saved on the plan in Stripe. Stripe only uses a plan's trial when the subscription request asks for it, and Stripe Create Subscription doesn't. So subscriptions created by that action start without the trial. Test this in test mode before you rely on it.

Considerations​

  • Amounts are in the smallest unit. 999 is 9.99 USD, not 999 USD. For zero-decimal currencies, such as jpy, the amount is the whole amount. Decimals, such as 9.99, aren't accepted.
  • Use lowercase for the interval. When you set Interval with an expression, it must be exactly day, week, month or year. Month fails.
  • Stripe creates the IDs. You can't choose the plan ID. Save [Stripe:PlanId], because you need it to subscribe customers.
  • Every run creates a new plan. Running the action twice creates two plans, and two products when Use Existing Product is unchecked. To reuse a product, check Use Existing Product and pass [Stripe:ProductId] from the first run.
  • Plans are Stripe's older model. Stripe now uses prices for this, but plans still work. The action uses the Plans API, through the Stripe.net library version 29.2.0 (Stripe API version 2019-09-09).
  • Test and live keys. A connector with a test key (sk_test_...) creates the plan in test mode. A plan created in test mode doesn't exist in live mode, so create your plans again with the live key before going live.
  • Plans can't be changed here. Stripe doesn't let you change a plan's amount or interval. To change a price, create a new plan and move customers to it in Stripe.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Monthly plan with a new product​

This action creates a Gold Membership product and a plan that bills 19.99 USD every month. On success, it saves the plan and product IDs in a table. Replace the connector ID with your Stripe connector.

{
"Title": "Stripe Create Plan",
"ActionType": "StripeCreatePlan",
"Description": "Create the Gold monthly plan",
"Parameters": {
"Credentials": {
"Entry": "00000000-0000-0000-0000-000000000000"
},
"Amount": "1999",
"Currency": "usd",
"Interval": "month",
"Nickname": "Gold - Monthly",
"IntervalCount": "1",
"ExistingProduct": false,
"ProductName": "Gold Membership",
"StatementDescriptor": "GOLD MEMBERSHIP",
"ProductMetadata": {
"Level": "Gold"
},
"OnSuccess": [
{
"Title": "Run SQL Query",
"ActionType": "RunSql",
"Parameters": {
"ConnectionString": "",
"QueryTimeout": "",
"SqlQuery": "INSERT INTO dbo.MembershipPlans (Name, StripePlanId, StripeProductId) VALUES ('Gold - Monthly', '[Stripe:PlanId]', '[Stripe:ProductId]')",
"BindTokens": "",
"OutputTokenName": "",
"ExtractColumns": "",
"OnError": [],
"ShowErrors": false
}
}
],
"OnError": [
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Parameters": {
"Message": "<p>Stripe couldn't create the plan: [Stripe:ErrorMessage]</p>"
}
}
]
}
}

2. Yearly plan for an existing product​

This action adds a yearly plan of 199.00 USD to the product in the [ProductId] token, for example saved by the first example. The connector ID comes from the [StripeConnectorId] token.

{
"Title": "Stripe Create Plan",
"ActionType": "StripeCreatePlan",
"Description": "Add a yearly plan to the Gold product",
"Parameters": {
"Credentials": {
"IsExpression": true,
"Entry": "[StripeConnectorId]"
},
"Amount": "19900",
"Currency": "usd",
"Interval": "year",
"Nickname": "Gold - Yearly",
"ExistingProduct": true,
"ProductId": "[ProductId]",
"OnError": [
{
"Title": "Log Error",
"ActionType": "LogError",
"Parameters": {
"Message": "Stripe Create Plan failed for product [ProductId]: [Stripe:ErrorMessage]"
}
}
]
}
}

Revised 09/27/2026