#ThePinkGuy

1 messages ยท Page 1 of 1 (latest)

hollow pathBOT
tired jolt
ashen kernel
#

wait some time, I am using all of my brain to understand the docs

tired jolt
#

NP! take your time

ashen kernel
#

so , what are the events that I need to listen to if I am in the following situation:
1 - I offer a 30 days trial for all 3 plans
2 - I update the database every time that the payment succeeds or fails
3 - I update the database every time that the trial period ends

now here is what I think I will be listening to :
1 - customer.created -> this one triggers once the customer subscribes to the free trial right?
2 - invoice.paid -> I will get the name of the plan that the customer pays , and update the database
3 - invoice.payment_failed -> I will get the id of the customer and remove the subscription
4 - customer.subscription.deleted -> because why not

I won't be listening to the following
1 - invoice.subscription.updated -> because if the customer changes subscription , then it triggers an invoice.paid , an event that I am already listening to

hollow coral
#

Hello! I'm taking over and catching up...

ashen kernel
#

humm okie

hollow coral
#

That list of Events makes sense to me. One thing I want to point out is that customer.created fires whenever a Customer is created, not just Customers associated with a Subscription.

ashen kernel
#

okye, in my case though the only thing that I am selling is the subscription , so that's the only time that it gets triggered right?

hollow coral
#

If that's how you built your integration, yes. But in the future you may create Customers for other reasons as well. Just want to make sure you're aware and take that into account. ๐Ÿ™‚

ashen kernel
#

and one last thing, how do I create a subscription with 3 different tiers that the customer can update (on the individual customer page hosted on stripe)? I tried creating a product with 3 prices but it does not work

hollow coral
#

You mean in the Customer Portal? You should be able to create three Prices and have them show up as long as you configure the Portal to allow that to happen.

ashen kernel
#

so right now I only have this product
it has 2 prices as you can see

#

but I cannot add the second pricing because this pops up

hollow coral
#

Yep. It doesn't make sense to offer two Prices for the same interval; people would always choose the cheaper one.

#

Can you tell me more about your use case?

ashen kernel
#

well there is going to be the basic plan , and other 2 plans
the basic plan will have a call limit of 1000 req/monh , and so on

hollow coral
#

Tiered pricing will automatically adjust the amount based on usage.

ashen kernel
#

so I think I fixed it
I added another product and now it works.
so this is how the plans will work :
A - access to feature A
B - access to feature A and B
C - access to all features

this is the right way to do it right?

#

the customer can only have plan A,B or C , not 2 at the same time

hollow coral
#

That sounds good to me. Make sure you test all the options in test mode to make sure there are no surprises though! ๐Ÿ™‚

ashen kernel
#

Okie

#

Btw, lets say that I use a service worker instead of the webhook, what is the best and fastest way to get the subscription plans of 10k customers through the api?

hollow coral