#ironbeard-webhook
1 messages ยท Page 1 of 1 (latest)
I'm implementing a shopping cart where all items are Subscriptions, and I'm currently using Stripe (Card) Elements (I would probably switch to PaymentElements if it didn't require the Subscription to be set up before rendering the form, since I allow my user to change the cart up until the moment they press Submit).
The webhooks I'm unsure about in particular are:
invoice_finalization_failed, invoice_marked_uncollectable, invoice_payment_action_required,
and should I listen for invoice_payment_succeeded if I listen for invoice_paid inorder to provision service?
I do have an Invoice model I set up in my local db in order to provide links to the invoice PDFs to the user and so that company staff can view them, etc.
Just wasn't sure if Stripe handled reaching out to the customer when invoices fail, etc, or if I have to address that
To provision access to your service with subscriptions, we recommend listening to customer.subscription.created, customer.subscription.updated, and customer.subscription.deleted events.
These events contain a subscription object, and the subscription has a status field indicating if it's active, past_due, or canceled.
https://stripe.com/docs/api/subscriptions/object#subscription_object-status
Just wasn't sure if Stripe handled reaching out to the customer when invoices fail, etc, or if I have to address that
Stripe will handle that for you, and there are settings in the dashboard about this
The settings can be found here: https://dashboard.stripe.com/settings/billing/automatic
Oh, awesome! Is there also a setting to send a CC or BCC email when Stripe sends invoices?
or should I listen for invoice.sent?
No I don't think you can add CC or BCC to Stripe emails.
Yes you could try to listen to invoice.sent, I would recommend to do some tests to make sure it works as expected.
I think this Managed Failed Payments page will solve most of my questions. I see there is a preview of what the email will look like there, is there a way I can see what will happen when they click the Update Payment Information? or a way to specify what that URL is (in order to direct them to their profiles on my site where they can update PaymentMethods)
No this flow is completely handled by Stripe, there's no URL to provide.
Gotcha, so if I wanted to send my own emails to the Customers I could listen for invoice.payment_failed. I could still specify the retry schedule in the Managed Failed Payments section you linked, and then when they inevitably fail, Stripe will send the invoice.payment_failed event, which I listen for to send custom email to the Customer with a link to update their PaymentMethod on my site?
Hi again ๐ jumping in for my teammate. That looks like a really solid approach!
sounds good, thanks!
I think this should be the last question for now ๐
If a Subscription is "cancelled" (say all payment retry attempts fail) does that send customer.subscription_deleted? And if someone updates a subscription to "cancel at period end" would it send customer.subscription_deleted at the end of the period?
You nailed it!
Thanks!