Standard Web Integration - Webview for Mobile Apps
If you intend to accept payments on your Android or iOS apps and do not want to integrate with our native SDKs, you can reuse your Razorpay Checkout web integration code. This opens the Checkout in a webview on your mobile app.
To do this, pass the callback_url parameter along with other checkout options to process the desired payment.
When you use webview, several features such as UPI Intent are not supported. We recommend integrating with our native Android and iOS SDKs instead.
The script that callback_url points to should to handle incoming POST requests. For a successful payment, the callback URL will have razorpay_payment_id.In addition, razorpay_order_id and razorpay_signature will be returned in the Request body, provided your server-side has been integrated with Orders API. For more details, refer the Orders API document.
You can set query parameters with callback_url to map it with entities at your end. For example, following is a valid callback URL: https://your-site.com/callback?cart_id=12345
If you are loading the checkout form directly to WebView on your native mobile app without using our Razorpay SDK, you must provide a callback_url in the Razorpay Checkout parameters. After the successful payment, a redirect is made to the specified URL.
You can enable the handover control from the page loaded at callback_url to your native app code.