Lesson notes
How it works
How paid plans and prices fit together
A paid plan is the access level, for example Premium. A price is how much and how often someone pays for it, for example $10 a month. One plan can have several prices, like monthly and yearly. When you create a plan in Memberstack it creates a Product in Stripe, and each price is a Stripe price.
Your buttons use the Price ID, which starts with prc_, not the Plan ID. Always copy it from the Memberstack dashboard, not from Stripe.
How to connect Stripe and create a price
You need a Stripe connection before you can add a price. The dashboard will prompt you when you add your first price, or you can go to Settings, then Stripe Settings, and click Connect. One Memberstack project connects to one Stripe account.
- In Plans, click Add plan, choose Paid Plan, name it and click Create Plan.
- Connect Stripe if you are asked to.
- Open the plan, expand Prices and click Add.
- Name the price, choose Recurring, enter the amount, currency and frequency, then click Create Price.
- Copy the price's
prc_ID from the plan's installation panel.
Why you can't edit a price later
Once a price is created, its amount and billing interval are fixed. To charge a different amount, create a new price, swap the new ID onto your buttons, then archive the old one. Existing subscribers keep paying the old rate until they switch.
What happens at checkout
Put data-ms-price:add="prc_your-price-id" on a button and add data-ms-modal="signup" so it opens the signup modal. A member needs an account before they can pay, so a logged-out visitor signs up first, then goes straight to Stripe Checkout. When Stripe confirms payment, Memberstack adds the plan and sends the member to the plan's On Signup redirect. Set that under the plan's Redirects, for example /success-paid, so you can see at a glance that the paid flow worked. In test mode, pay with Stripe's test card 4242 4242 4242 4242, any future expiry date and any CVC.