Create Subscription Element
A guide to show how to create a subscription payment
With subscriptions, customers make recurring payments for access to a product. A subscription might not seem much different from a
one-time purchase of a t-shirt or water bottle.
Note: currently, this plugin will redirect to stripe-hosted checkout page to finish the subscription payment, but in the future, we plan to support more subscription payment elements to finish the payment by staying on the self page.
So far, we have only two types elements of recuring pay:
Single Sub and
Single Sub means there is only one price option to choose from, in the contrast,
Multi Sub means you can provide a multi-price option for the customer, similar to what the price table does.
The question is: what's the price coming from? Where we can create? Let's continue.
Our plugin doesn't store any created price from stripe or create prices by ourselves, we only fetch the single-source prices from Stripe on the fly by leveraging the stripe API. Therefore, it's free to create a price on the stripe side or within our plugin.
Before creating your price, you need to know how to model your subscription prices.
Prices are the primary objects used to model subscriptions.
Products define what you’re selling and
prices define how to charge for the product. For example, if you offer photo hosting for 15 USD a month, photo hosting is your product and the 15 USD a month is your price.
Normally, one product can include multiple prices, but if you want to make things simpler, you can always create one product with a single price.
For example, you want to provide a premium service:
basic with $12.99/month,
pro with $24.99/month,
business with $48.99/month. Then you can create three products:
Basic option — Price 12.99 USD
Professional option — Price 24.99 USD
Business option — Price 48.99 USD
After you create the prices, record the price IDs so you can use them in subsequent steps. The Pricing section of the product displays each ID and the ID looks similar to this:
The Copy to live mode button at the top right of the page lets you clone your product from test mode to live mode when you’re ready.
Once you create any products/prices on the stripe side, you should see them all in
Price tab of our plugin. Or you can select them directly from creating an element price field dropdown list.
Once the recuring element is created, just copy the shortcode to any of your pages and explore it.