Dev Tomiwa@_devTomiwa
Killing the user's internet connection ideally shouldn't determine whether a payment succeeds or fails.
Once the payment request has been created and the user has authorized the payment (or the payment processor has received it), the payment provider continues processing it independently of the frontend.
The frontend can disconnect, crash, or lose internet, but the backend should still track the payment status. The provider's webhook should be treated as the source of truth for the final outcome (success, failure, expired, etc.).
If the client's internet comes back before the payment session expires, the frontend can resume polling or refetch the payment status. If the payment has already completed, the webhook should already have updated the backend, allowing the client to simply fetch the latest state rather than relying on the original browser session.