When a payment succeeds, the gateway calls your webhook with the details. When a form is submitted, a webhook can push it into the CRM. It is the mechanism behind most real time automation.
Webhooks must be verified, since anyone can send a request to a public address, and they must be handled idempotently, since the same event can arrive twice. Getting those two things right is most of the difference between an integration that works and one that double counts orders.
Every payment integration we build confirms the order from the verified webhook, never from the browser, because the browser can be closed before the payment completes.