If you integrate your payment methods with Stripe, you must do this with webhooks.
In Stripe, go to the section that says Developers ---> WebHooks and it will appear:
Step 1:
Step 2:
Step 3:
Click on Add Endpoint at the top right and a form like this will appear:
In Endpoint URL you put:
In Version leave the one from 2017 or 2020.
And in Events to Send you add:
invoice.paid
invoice.payment_failed
customer.subscription.deleted
payment_intent.succeeded
And you click save.
Once saved you should see something like this: