To instantly learn about changes in payment statuses and automate the payment process on your site, you need to link your site and Stripe. This can be achieved by setting up endpoints in Stripe dashboard.
How do I add endpoints?
Follow the path from the image, but remember to check in what mode (Test or Live) you are because there are different webhooks for Test and Live modes!
When you click the “Add an endpoint” button in the Stripe you will be redirected to the webhook creation page.
First, go to your website admin panel to WooCommerce -> Settings -> Payments -> Stripe AfterPay. Here you will see the “Copy Stripe Webhooks endpoint to clipboard!” button – click it and go to the Stripe Dashboard. Paste the copied endpoint to Endpoint URL field.
After that you need to click the “Select events” button and you have to choose next event from Select events to send:
and click the “Add events” button.
After you are redirected to the previous page, you need to click “Add endpoint” button. And voila!
This route is needed to send messages from the Stripe about charges status – succeeded.