Website: Update receive-from-stripe webhook to handle failed payments when creating a subscription. (#14348)

Changes:
- Added two events to the
`STRIPE_EVENTS_SENT_BEFORE_A_SUBSCRIPTION_RECORD_EXISTS` array in the
`receive-from-stripe` webhook
This commit is contained in:
Eric 2023-10-06 10:07:51 -05:00 committed by GitHub
parent 5ebeab20f5
commit e61d91a35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,8 @@ module.exports = {
'invoice.finalized',
'invoice.paid',
'invoice.payment_succeeded',
'invoice.payment_failed',
'invoice.payment_action_required',
];
// If this event is for a subscription that was just created, we won't have a matching Subscription record in the database. This is because we wait until the subscription's invoice is paid to create the record in our database.