#crazyPixel-question
1 messages · Page 1 of 1 (latest)
Hi @gaunt dust thanks! I've just started with stripe and I'm trying to understand a few things related to the integration part
I have a web app with 3 different plans where the first is free
I created products with prices for the other 2 plans on stripe and started working on the integration
since a customer on my app can already be registered I can simply create the client entity on my backend correct?
I mean for an already registered client I can collect all the necessary metadata to send back to the client for the user to pay through stripe checkout
Yep that works fine
OK, now for something I can't really get
I have different limits within every plan
What happen when a subscription term ends? in my case a month
stripe tries to charge the client again and simply uses the provided webhook to notify me with results?
I'm asking this because I'm trying to understand how to reset different limits attached to plan. I think that I can simply do it when I get notified from stripe but I'm not sure
also what happen if the user upgrade or downgrade his plan? the same webhook is activated?
Hi, I'm stepping in for @gaunt dust Gimme a sec to catch up
np, thanks alot!
What do you mean by
I have different limits within every plan
@lime relic Don't wanna confuse you but from my understanding I get the https://stripe.com/docs/billing/subscriptions/webhooks#events Event entity with the "customer.subscription.updated" when a recurring payment occur AND when a change in plan occur
Different rate limits
So for example the free plan will have 1k requests the starter plan have something like 10k and the premium 1m
requests as in requests to server to get data
So to answer the Webhook question, yes both changes to the subscription will trigger the event you referenced.
And a new subscription creation will also trigger the same event?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Slightly different to notify you a new subscription was created
Since you said you are just getting started, have you had a chance to play around with the Stripe CLI?
Also - is it more common to also create my free plan as a product so upgrade is done via the same webhook? and - is there a better way to do tiered based plans in stripe?
Well you are already discussing webhooks a fair amount so i thought I'd recommend playing around with it. It will allow you to stream webhook events to your local development environment and trigger events manually when you want to test how they behave
I'll def give it a go
about plan change - is it common to create free plan also in stripe (as a product)? and is there a better way to create tiered plan in stripe? like aggregating different products under something or something similar to it?
You mean other than our general tiered approach?
https://stripe.com/docs/products-prices/pricing-models#tiered-pricing
I'll look into that
but it looks like it's based on volume or unit, my plans kinda have a "built structure" so to speak
like -
free - 1k requests, 10 objects, 1 user
starter - 10k requests, 100 objects, 3 users
premium - 1m requests, 1000 objects, 20 users
Okay then that is something you would need to manage on your end and use distinct Price objects in Stripe for each tier. We try to cover the general use cases but can't cover them all
I see
ok thanks a lot!
so just to iterate - on subscription renewal and subscription creation I'll get the event of "customer.subscription.updated"
On subscription creation you'll get a customer.subscription.created event firing
So the one I mentioned is only fired when the subscription is renewed (at the end of the last term)
?
No, it's fired any time the subscription is modified
oh whoops my bad - the "invoice.created" is the one to be sent once the subscription is renewed