Handle the Result
After the customer completes checkout, HesabPay can redirect the browser to your configured success or failure URL.
Redirects
Section titled “Redirects”Use redirects to show a customer-facing result page:
redirect_success_url: customer sees confirmation.redirect_failure_url: customer sees failure instructions.
Redirects are not the final source of truth because browser navigation is not guaranteed.
Webhooks
Section titled “Webhooks”Use webhooks to update your backend systems:
- Mark orders as paid.
- Release digital products.
- Notify warehouse or fulfillment systems.
- Reconcile transaction records.
- Handle failed payments.
Recommended pattern
Section titled “Recommended pattern”- Show a pending order state after the customer returns from checkout.
- Wait for a verified webhook before fulfilling the order.
- Make webhook handling idempotent so retries do not duplicate fulfillment.