Search code examples
stripe-paymentslogicwebhookspayment-gateway

Which stripe events do I need to listen for with my webhooks?


There are many possible events to listen for but many seem to be called for the same reason.

In my case I have a subscription and I want to update my database based on if they have payed or not payed each month. I also have a free trial so during that trial I still want the database to say that the user is paying even tho no money has been payed.


Solution

  • You may refer to the webhook events for the subscriptions here: https://stripe.com/docs/billing/subscriptions/webhooks#events

    In general following events can be listened according to the scenarios you described:

    • When a subscription is created -> customer.subscription.created
    • When an invoice of subscription including $0 trial invoice is made/paid successfully -> invoice.paid
    • When an invoice of a subscription failed to make payment -> invoice.payment_failed