Razorpay Payment

This action lets users process a payment inside your app using credit cards, debit cards, net banking, UPI (Unified Payments Interface), and digital wallets via Razorpay.


Before you add this, you'll need to complete the Razorpay Integration.

Adding Razorpay Payment action

Follow the steps below to add this action:

  1. Select the widget (e.g., checkout button) on which you want to add the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action Flow Editor in a new popup window. Click on the + Add Action.

  3. Search and select the Razorpay Payment (under Integrations) action.

  4. Enter or use a variable for specifying the total amount under the Amount section. Note that the value should be specified in the currency's smallest unit.

    • For example, $24.99 should be passed as 2499 (as a round-off integer; otherwise, it would be automatically rounded); similarly, for an amount of ₹120.00, 12000 should be passed.

    • Most probably, you'll specify this value from a variable. If you do so, you might need this code expression to convert the total amount in the required format: amount.toStringAsFixed(2).replaceAll(".", "");

  5. Enter the Currency Code to be used for the amount, for example, INR, USD, EUR, or BRL. Make sure you enter a valid currency code; otherwise, the transaction won't go through. Download the complete list of supported currencies.

  1. With this action, you can also add some optional fields, such as Receipt Number, Description, User Name, User Email, User Contact, and Timeout (time for which the checkout dialog should remain active. By default, it is 180 seconds).

  1. You can also customize the color scheme for the payment sheet using properties such as Dialog Color, Barrier Color, Text Color, Processing Color, Success Color, Error Color, and more.

  1. Enter an Action Output Variable Name where the payment ID would be stored on a successful transaction.

  2. Now you must check if the payment was successful. You can do so by adding the conditional action. To do so, click the "+" button below the previous action tile and select Add Conditional.

  3. On the right side (Set Condition for Action),

    1. Select UNSET > Condition > Single Condition.

    2. First Value > Action Output Variable Name.

    3. Set the operator to Is Set and Not Empty.

  4. Under the TRUE section, add an action that will be triggered if the payment is successful.

  5. Under the FALSE section, add an action that will be triggered if payment is failed.

Ensure the user is authenticated before triggering this action; otherwise, it will result in an error. You can follow the steps on this page to set up Firebase Authentication.

Last Updated Date: February 6, 2024

Last updated