Flow: OTP

The One-Time Password (OTP) node is used to generate a one-time password in the format specified in the OTP API request. It has two modes:

  1. [Generate OTP](#section-generate)
  2. [Validate OTP](#section-validate)

Figure 1: Node

You can configure OTP format (numeric, alpha-numeric, and alphabetic), OTP validity time and resend options.


This node must be used in conjunction with Send and Receive nodes. When the OTP is generated it must be sent to the customer using the Send node. When the customer responds, OTP is received using the Receive node. After receiving the OTP, it must be validated using the OTP validate mode.


The OTP node operates in two modes. You can configure the node either to generate an OTP or validate an OTP.

Double-click the OTP node. The setting option prompts you to configure the OTP mode. ChooseGenerate mode / Validate mode as per the flow requirement.


Figure 2: Settings


The below screen is displayed when you select Generate _mode. At runtime, OTP is generated and the value is stored in sysOtpResponse variable. When a _Send Node is connected, the variable must be configured in the message property of Send node.

For example, Dear user, your OTP is $(sysOtpResponse) valid for 10 minutes.


Figure 3: Generate



OTP format

Choose the format of the OTP you wish to generate. Available options are:

  • Alphabetic
  • Numeric
  • Alphanumeric
OTP lengthSpecifies the length of the OTP. You can set
the OTP length up to 64 characters.
Your OTP will look likeDisplays sample OTP format (example) that you have selected.It's a read-only property. It gives you an understanding of the OTP being generated.
OTP validity (min)Specify the validity (time )of the OTP in minutes, before the OTP expires.
Transaction referenceSpecifies the identifier of a customer for which the OTP is being generated.
For Resend requestsWhen a resend OTP command is initiated by the end customer, selectingReplace current OTP with the new one generated will generate a new OTP and send it to the customer once gain. it specifies if the OTP must be overridden or the resend the same OTP.

Re-use current OTP by extending validity will send the same OTP once again by increasing the validity of the OTP by the time you have set under OTP validity.
Notify URL (optional)Specifies the notification URL about the delivery of the OTP.
Extra parameters (Optional)It is the key-value pair that is received as a response in the event of successful node activity.


The below screen appears when Validate mode is selected. To validate the OTP, it must be used along with a Receive node. The response from the end customer is stored in sysResponseMessage variable. This variable must be referenced in validation mode.


Figure 4: Validate

OTP input variableSpecifies the variable that receives the OTP from the customer.
Transaction referenceSpecifies the identity of a customer for which the OTP is being validated.The Transaction reference in Generate mode and Validate mode should be same.
OTP Format (optional)
Add 'onsend' edge
Resend OTP command
Notify URL(Optional)Specifies the notification URL to notify the success or failure of the OTP validation.
Received PIN Format (Prefix and suffix are optional)This option will parse the message received in the variable $(sysResponseMessage). Enter the prefix or suffix text that should be ignored to validate the OTP.
Resend Initiator commandEnter a command to initiate a resend OTP.
Extra parameters (Optional)Enter the Parameter and Value.


For information on session data, click here.


For information on custom logs, click here.


To configure the nodes, select the node event point and drag anywhere on the screen.

Exit eventDescription
onsuccessThis event is triggered if the node flow is completed successfully.
onerrorThis event is triggered if an error occurs.
onresendThis event is triggered if the end customer request to receive the OTP once again.