#JCoDog - webhooks for subscriptions

1 messages · Page 1 of 1 (latest)

dim heron
#

Hi there 👋

late tundra
#

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?

dim heron
#

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

late tundra
#

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?

dim heron
#

Stripe can email a customer to remind them of an upcoming invoice and/or if an automatic invoice payment failed

late tundra
#

Ok thats great thank you.

dim heron
#

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

late tundra
#

ok so which webhook event is for the payment failed and subscription now cancelled/expired/ended?

dim heron
#

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

late tundra
#

Ok, how do I define how many days after payment failure the subscription cancell?

dim heron
#

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

late tundra
#

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?

dim heron
#

Not necessarily, no.

#

It really depends on how you structure your pricing model and the services you offer per price

late tundra
#

But I cannot allow the changing of the "package" in the portal

dim heron
late tundra
dim heron
#

By portal, are you referring to the customer portal?

late tundra
#

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?

dim heron
#

I think I follow, yes

#

It sounds like you'll want multiple products, each with a monthly and yearly price

late tundra
#

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?

dim heron
#

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