#JCoDog - webhooks for subscriptions
1 messages · Page 1 of 1 (latest)
Hi
I am looking at the subscription webhook guide but there are ones that are handled with checkout, invoice and subscription events.
Which ones are best to handle when the subscription is made, when it is paid and then if the user has payment failure and cancelled subscription?
Plus would stripe handle the mailing of the payment reminder, success and failure emails or should I integrate that into my solution?
customer.subscription.created should be used to listen for subscription creation
invoice.paid, invoice.payment_failed, and invoice.payment_action_required can be used to keep track of payment status
customer.subscription.updated can be used to listen for changes to a subscription, including cancellation
So these to handle the customer side.
Would I need invoice paid and failed etc if stripe handles the emailing of the user? Because surely if the sub gets cancelled due to payment failure then sub updated would be all I need to remove access to the services?
Like does stripe email the customer about invoices?
Stripe can email a customer to remind them of an upcoming invoice and/or if an automatic invoice payment failed
these settings can be found in the Dashboard: https://dashboard.stripe.com/settings/billing/automatic
Ok thats great thank you.
yep, you're right on point. webhooks are useful if your team needs to remove access to a service based on a failed payment or cancellation
ok so which webhook event is for the payment failed and subscription now cancelled/expired/ended?
invoice.payment_failed is for a failed invoice payment. as for the cancellation, you'll want to inspect the details of customer.subscription.updated, as this event could be sent for multiple types of subscription updates
Ok, how do I define how many days after payment failure the subscription cancell?
Ah, that's also a setting in the Dashboard
There are controls for how many automatic retries, as well as what to do with subscriptions and invoices if all payment retries fail
These settings are available on the same page: https://dashboard.stripe.com/settings/billing/automatic
Having a problem with the portal. I want users being able to change the amount they pay for this product as it changes their rewards on my site. However it says it is selling the same product at different prices. Would I therefore need to configure 3 different products to do this?
Not necessarily, no.
It really depends on how you structure your pricing model and the services you offer per price
But I cannot allow the changing of the "package" in the portal
This might be a helpful guide: https://stripe.com/docs/products-prices/pricing-models
By portal, are you referring to the customer portal?
Yes
I want them able to adjust if they are the highest tier or lower tiers in the portal
So I assume that means 3 seperate products
This basically... I want it so that when the user goes to update plan it only shows the donator options of "standard" "premium" "basic" and the monthly/yearly
But, there will be 2 types of sub
Would it be easier to handle plan changes natively in my website and handle the monthly/yearly change in the portal?
I think I follow, yes
It sounds like you'll want multiple products, each with a monthly and yearly price
Basically I am trying to migrate to an on site subscription handler instead of using buymeacoffee as the functionality of their site limits what we can offer for subscribers. So I am assuming I would then need to handle plan upgrade and downgrade on my site… and then allow the user to change the payment duration from monthly to yearly and vice Versa on the portal?
For the plan vs. price change, I think that'll be up to you and whether any of the portal limitations could apply: https://stripe.com/docs/billing/subscriptions/integrating-customer-portal?platform=API#limitations
You also have the ability to configure which products and prices are visible within the portal. The settings you adjust for this in the Dashboard will be treated as your "default" portal configuration, but you can also create additional configurations
Additional configurations can only be created via the API: https://stripe.com/docs/billing/subscriptions/integrating-customer-portal?platform=API#customize