checkoutUrl — a hosted payment page where your customer completes the payment. By default, after the payment finishes the customer stays on that page.
To bring the customer back to your site, append redirect parameters to the checkoutUrl before you send the customer to it. The hosted page reads them and redirects the customer to your success URL when the payment reaches SUCCESS, or to your failure URL when it becomes FAILED or EXPIRED.
Redirect parameters
All three parameters are optional and independent — you can set only
rs, only rf, or both. If a parameter is missing, the customer simply stays on the result screen for that outcome.
The redirect URLs must be base64-encoded (standard or URL-safe base64 both work; padding is optional) and must decode to an absolute
http:// or https:// URL. A value that fails to decode, or decodes to anything other than an http(s) URL, is ignored and no redirect is offered.How it looks to the customer
ar=true— after the payment resolves, the result screen shows a 10-second countdown ring with a “redirect now” button. When the countdown reaches zero (or the customer clicks the button), the browser navigates to your URL.aromitted — the result screen shows a button; the customer is redirected only when they click it.
End-to-end example
The snippet below runs on your backend — the API key must never reach the browser. It creates the payment, takescheckoutUrl from the response, and attaches the redirect parameters.
302 to it, or return it from your route and navigate client-side:
Handling the customer’s return
When the customer lands back on your site:- Read your order reference from the URL you constructed (e.g.
orderId). - Look up the payment’s final status on your backend — via the webhook notification you received, or by querying the payment status API.
- Render your own success or failure page based on that verified status.