When integrating with Standard Checkout, you can also pass a
callback_url for redirection-based flow. If popup creation fails for some reason, the browser is redirected to an external page (bank/3D secure page) for customers to fill in OTP/PIN. At the end of the payment, the control is returned to the
callback_url previously created by you on which the payment results will be submitted.
If you reuse your web integration of Razorpay Checkout inside a web view on iOS, the Checkout Form may not open.
However, in certain scenarios, you might want to reuse web integration in a mobile app. You can do so by passing the
callback_url along with other checkout options to process the desired payment.
The script that the
callback_url points to should handle incoming
POST requests. The callback URL will have
razorpay_payment_id for all successful payments.
If your server is integrated with Orders API,.
razorpay_signature are returned in the Request body. To learn about Orders API, refer to our
You can set query parameters with
callback_url to map it with entities at your end. An example of a valid callback URL:
|Payment failed due to incorrect card number
|Present if the payment fails due to basic validation error
If you are loading the Checkout Form directly to the
WebView on your native mobile app without using Razorpay iOS SDK, you must provide a
callback_url in Razorpay Checkout parameters. After the successful payment, users are redirected to the specified URL.
You can enable the handover control from the page loaded at
callback_url to your native app code.
The webpage will be loaded into a WebView class. To communicate anything from the webpage loaded into WebView to native code, you must add a
webView will be able to call native methods of
PaymentInterface class by calling
UIWebView does not provide this functionality.
The bridge is implemented by passing an instance of
WKScriptMessageHandler and a string (which is the name of the bridge).
The instance of
Only the function
messageBody passed by the script must contain the appropriate data to control the flow of the native code.