简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM