#0xL34N
1 messages · Page 1 of 1 (latest)
Hello! @steady fog O'm sorry I have no idea what your sentence tries to describe
What does "pass in the creation method the id of subscription" mean?
What's the context? Are you using Checkout? Elements? Billing?
I have a subscription model that has a free and a paid plan.
My intention is that when a user creates an account, by default I assign him the free plan, and only when he wants the Pro Plan, I create the checkout to make the payment or the portal to change the plan.
I do not know if I explain well.
Yep that makes total sense now! The problem is that Checkout is only used to start a brand new Subscription
What you could do is create a Subscription for the free Price and then if your Customer wants to upgrade you can send them to the CustomerPortal instead of Checkout
Otherwise it might be easier to not create a free Subscription if you prefer to use Checkout for the paid option
Perfect, I choose the option of creating a subscription to the free plan and then if you want to upgrade, I send it to the customerPortal.
How can I assign the free subscription to the customer by default?
When you create the customer, you'd follow that up by creating a subscription for them using your free plan:
The key part is setting the price for the first item to your free price: https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Where the price amount is 0, no payment is required and the subscription can be active immediately. Later, when needed, you can allow the customer to change their plans using the customer portal.
Oka, and when i assigned this subscription at the customer
And when the user use customer portal to change the subscription, we can request address and payment information?
Yes updating payment methods is supported: https://stripe.com/docs/customer-management#customer-portal-features
I'd encourage you to test out your flows in test mdoe and try out how this works
Oka, thanks for your help
I have other question
Why when i create a subscription, i pass the price_id and not use the product_id
Because products are a description of the thing being sold/paid for, while Prices define an amount to be paid & frequency
You might have a "Gold Plan" that's $10/month or $100/yr, but its the same product
That 1 product, two prices
or maybe its 10 USD/month and 8 Euro/month
but again the same product, two prices
but your "Diamond Plan" is $20/mo or $200/yr, or 15 euro/mo etc
so that would be a different product, because the diamond plan presumably offers features not in teh gold plan, its a different thing
Wow, thanks for that explanation!
NP - hope it helps clarify the difference here
Now I would like to tell you about my business model so that you can recommend me how to implement it with Stripe.
I have a free plan and a Pro Plan.
The Pro Plan has a cost of 30€ and includes 1500 message sendings, but then when you exceed this amount, you are charged 0,01€ per additional sending.
How would you recommend me to create this model with Stripe.
I suggest taking a look at our usage based billing docs, which talk about a model just like this and how it can be achieved with tiers:
https://stripe.com/docs/billing/subscriptions/usage-based#product-modeling