#chirp

1 messages · Page 1 of 1 (latest)

knotty meadowBOT
scenic harbor
#

Hi there! my teammate had to step away. How can I help?

zenith bison
#

Hi.

#

Im trying to find a one stop shop on subscriptions with checkout and im seeing a lot of different topics but its never clear how they relate to checkout. Like I can see docs and videos on subscriptions but they are all seemingly talking about it from the pov of a fully integrated payment system .

#

I guess my topline questions are

  1. how do I handle subscription payments. (I have a webhook that listens for checkout.session.completed but what else should I listen for.

  2. how do I know when a user cancels their subscription. How do I enable them to cancel their subscription with a checkout link.

  3. how do I know if a monthly renewal payment worked? Or failed?

  4. How do I test all of these?

scenic harbor
#
  1. I recommend listening for invoice.paid and invoice.payment_failed
zenith bison
#

thanks

#

btw - im not getting discord dings....

#

Oh - I think I might have suppressed notifications to just @. I've changed that. we'll see.

scenic harbor
#

Ah, I see!

zenith bison
#

so ... session.complete is the first signup event? Is it fair to say that I would expect "invoice.paid" to what happens with the monthly subscriptions?

#

Or is it possible that I will get a session.complete that isnt paid and instead I have to wait for the invoice.paid.

scenic harbor
#

session.complete means they've completed the Checkout session. you should also see a customer.subscription.created event (a brand-new subscription should be created when the Checkout session is completed)

#

yes, if a monthly renewal is successfully paid for, you should see invoice.paid

zenith bison
#

can I just listen for checkout.session.completed and not worry about customer.subscription.created?

#

Also how would I test all of this? Especially the renewal cycle with success and failure patterns.

scenic harbor
#

Yep, you could. The checkout.session.completed event will return a Checkout session object. If that's all the information you need for your fulfillment process, then you're good! customer.subscription.created is the Subscription object, so that will include all details about the subscription itself (not just the subscription ID)