API ReferenceIntegrationsKnowledge Base

Standard Web Integration - Additional Features

In addition to using the default features available in the Checkout, you can also perform the following actions:

Switch between Integration Methods, Manual and Automatic🔗

It is possible to easily switch from one integration method to another. That is, if you were earlier using Manual Standard Checkout, you can switch to the Automatic method.

This is possible as the Standard Checkout integration searches for the data-key field inside the <script> tag, which when found switches to automatic mode. It also creates a button alongside the <script> tag and attaches its 'onclick event handler' (created internally) to the .open method of the Razorpay object.

Track the Modal🔗

In the Manual Checkout, the status of the checkout modal can be tracked.

This feature is only supported in Manual checkout.

You can pass a modal object with ondismiss: function(){} as options. The ondismiss function is called when the modal is closed by the user.

Copyvar options = { "key": "<YOUR_KEY_ID>", // Enter the Key ID generated from the Dashboard "amount": "29935", "name": "Acme Corp", "description": "A Wild Sheep Chase is the third novel by Japanese author Haruki Murakami", "image": "http://example.com/your_logo.png", "handler": function (response){ alert(response.razorpay_payment_id); }, /** * You can track the modal lifecycle by * adding the below code in your options */ "modal": { "ondismiss": function(){ console.log('Checkout form closed'); } } }; var rzp1 = new Razorpay(options);

You can utilize the handler function called on every successful transaction for tracking payment completion.