Resend OTP
  • 06 Jun 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Resend OTP

  • Dark
    Light
  • PDF

Article summary

This message is used to perform a payment and it is based on the API Communication Model described in the Communication Model section. 

For URPay (payment method 4), only two successful resend OTP requests are allowed. Any further resend attempts will cause the phone number to be blocked for some time.

For STCPay (payment method 5) and Emkan (payment method 7), the resend OTP is not allowed. To get a new OTP you need to send a new transaction

Request Parameters

ParameterDescription
MessageID
required

An alphanumeric value that represents the action for defined unique numbers as mentioned below: 

  • 20 for Resend OTP  
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 20
TransactionID
required

The merchant generates the Transaction ID. It represents a unique identifier for the transaction and is alphanumeric which must not include special characters or spaces.

  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: 1440954863817
OriginalTransactionID
required
The transaction ID belongs to the original transaction, which should be resend an OTP
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: 1440594083737
MerchantID
required
An alphanumeric value that represents the unique Merchant ID at SmartRoute. The Payment Gateway operation team provides this value based on the merchant enrollment.
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: MID0001
PaymentMethod
required
An Alphanumeric value indicates the payment method. Supported values depend on the requested version as follows:   
  • 1 ➔  It will be a Card payment.
  • Field Type: Numeric 
  • Length: 1
  • Sample Data: 1
SecureHash
required
An alphanumeric value that represents the generated hex-encoded hash using hashing algorithm SHA-2 (256) by concatenating parameters as a single string starting with the merchant’s Merchant Authentication Token. Then all parameters (required parameters and optional parameters - if available) are ordered alphabetically. By parameter’s name should be part of the secure hash, with no separators and no terminating character.

Appendix B: Secure Hash – API Payment; for more information, see secure hash generation. 

  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: e9fbb3c46ec9c7dec2a318edc283bbbea27bc5d7bf7da30f4f2e62b89df74a2e

ClientIPaddress
required
An alphanumeric value that represents the client’s public IP Address.
  • Field Type: Alphanumeric
  • Length: 19
  • Sample Data: 79.183.118.666 
ItemID
optional
An alphanumeric value that represents the custom item ID.
  • Field Type: Alphanumeric
  • Length: 25
  • Sample Data: Item1
Channel
optional

The Channel to be used by SmartRoute System. It could be one of the following: 

  • 0 for E-Commerce
  • 1 for IVR
  • 2 for POS
  • Field Type: Numeric
  • Length: 1
  • Sample Data: 0
Version
optional

A numeric value with (.) separator represents the command's version to be used. If this value is not provided, SmartRoute will consider its default value which is 1.0

Possible version values:

-  2.0 or higher: an additional response field will be returned from SmartRoute to merchant that represents the payment method used "Response.PaymentMethod"

-  2.1 or higher: indicates that the merchant will provide the AgreementID and AgreementType fields.
- 3.1: An additional response field will be returned from SmartRoute to the merchant that represents the Issuer Name used "Response.IssuerName"

  • Field Type: Numeric
  • Length: 5
  • Sample Data: 1.0

Response Parameters

ParameterDescription

Response.StatusCode 
required

An alphanumeric value that represents the response code that covers errors generated by the SmartRoute.  

Appendix A: API Payment Response Codes for descriptive details about Response Codes. 

  • Field Type: Alphanumeric
  • Length: 5
  • Sample Data: 00000
Response.StatusDescription 
required

An alphanumeric value that represents a message describing the response status received from SmartRoute. This parameter is filled only after a complete execution process using the language specified in the request. This value should be UTF-8 encoded when it is entered into the secure hash generation process.

  • Field Type: Alphanumeric
  • Length: 100
  • Sample Data: Payment processed successfully
Response.Amount
required

A numeric value that contains the purchase amount of the item.
The value is in ISO format with no decimal point. Also. For example, 100 for 1.00 USD.

  • Field Type: Numeric
  • Length: 9
  • Sample Data: 100
Response.CurrencyISOCode 
required

The numeric value is in ISO format for the currency. The value should be neither character value nor decimal point.

For example, 840 for US Dollar, 400 for JOD.

  • Field Type: Numeric
  • Length: 3
  • Sample Data: 840
Response.MerchantID 
required
An alphanumeric value that represents the unique ID of the merchant at SmartRoute. The SmartRoute operation team provides this value upon merchant enrollment. 
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: MID0001
Response.TransactionID 
required
The merchant generates the Transaction ID. It represents a unique identifier for the transaction and is alphanumeric which must not include special characters or spaces.
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: 201508180000001
Response.MessageID 
required

An alphanumeric value that represents the action for defined unique numbers as mentioned below: 

  • 20 for Resend OTP   
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 20
Response.SecureHash 
required

An alphanumeric value that represents the generated hex-encoded hash using hashing algorithm SHA-2 (256) by concatenating parameters as a single string starting with the merchant’s Merchant Authentication Token. Then all parameters (required parameters and optional parameters - if available) are ordered alphabetically. By parameter’s name should be part of the secure hash, with no separators and no terminating character.

Appendix B: Secure Hash – API Payment; for more information, see secure hash generation. 

  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data:e9fbb3c46ec9c7dec2a318edc283bbbea27bc5d7bf7da30f4f2e62b89df74a2e 
Response.RRN 
optional
An alphanumeric value that represents a Receipt Reference Number for the current payment transaction. This value is returned if the value is provided from the gateway.
  • Field Type: Alphanumeric
  • Length: 60
  • Sample Data: 201508201600462840000000000
Response.PaymentMethod
Conditional

An Alphanumeric value indicates the payment method. Supported values depend on the requested version as follows:  

If Version is 1.0 :

  • 1 ➔  It will be a Card payment. Example: Visa
  • 3 ➔ It will be ApplePay payment. Example: ApplePAy Visa
  • Field Type: Alphanumeric
  • Length: 42
  • Sample Data: 1
Note:
SmartRoute operation team, upon merchant enrollment, provides possible Card Names
This parameter will be provided back for the failed response.
Response.IssuerName
Conditional

An Alphanumeric value indicates the Bank Issuer Name.  

  • Field Type: Alphanumeric
  • Length
  • Sample Data: Test Bank
Condition:
This parameter will be provided back to the merchant if the provided version in the request is 3.1 and failed response.

What's Next