How do I verify that a user has completed payment for the current term on an active subscription?

How do I verify that a user has completed payment for the current term on an active subscription?

You can listen to invoice.payment_made webhooks to be notified when a customer pays the subscription invoice. Also there’s a invoice.scheduled_charge_failed that you can listen to as well to be notified when a customers scheduled payment fails. :slightly_smiling_face:

The scheduled_charged_failed webhook doesn’t seem to work on subscriptions without a card on file, i.e. invoice sent by email, going past its due date. Is this expected behavior?

The only way I found to get around this was to look at invoice.update status compared to UNPAID, but I’m not sure that this is only triggered after due date passes or not?

Also with the invoices and subs without card I noticed that sub remained active and new invoices generated. Is this the same behavior for scheduled_charge_failed? Where I essentially need to cancel the subscription manually, and its not autocancelled via the charge failing.

Yes, that is the expected behavior for the event.

Unfortunately, events aren’t triggered when an invoice goes past due. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.

Lastly, the subscription will remain active when a scheduled_charge_failed. You’d have to cancel the subscription manually if you want what behavior. :slightly_smiling_face:

1 Like

It would be easier to use if subscriptions were automatically pause or cancelled in case of failed payments. Checking all invoices is too time consuming.

We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face: