Direct Post Verify
  • 06 Jun 2024
  • 8 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Direct Post Verify

  • Dark
    Light
  • PDF

Article summary

This message is useful for merchants when they want to verify the user’s card information in order to use the returned Token later on in other messages such as Recurring. Therefore, once SmartRoute receives a verify message, a payment is conducted followed by a reversal in case the payment was successful. 

This message is based on the Direct Post Communication Model.

Request Parameters

ParameterDescription
MessageID
required

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

  • 12 for Direct Post Verify 
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 12
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
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
Amount
required
A numeric value that contains the ISO Formatted item purchase invoice amount with no decimal point. For example, 100 for 1.00 USD.
  • Field Type: Numeric
  • Length: 9
  • Sample Data: 100
CurrencyISOCode
required
A numeric value that contains the ISO formatted code for the currency, not the character value. For example, 840 for USD.
  • Field Type: Numeric 
  • Length: 3
  • Sample Data: 840
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) except (CardNumber, SecurityCode, CardHolderName, ExpiryDateYear, ExpiryDateMonth since those parameters are entered by the customer (cardholder) on the screen and are submitted directly to SmartRoute’s URL, so they can’t be captured and entered in the secure hash parameters.) Ordered alphabetically by parameter’s name should be part of the secure hash, with no separators and no terminating character. 

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

  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: e9fbb3c46ec9c7dec2a318edc283bbbea27bc5d7bf7da30f4f2e62b89df74a2e
CardNumber
Conditional
The customer’s card number is used in the payment. If they sent PaymentMethod parameter is 1 (Card), this parameter is required. 
  • Field Type: Numeric
  • Length: 19
  • Sample Data: 4111111111111111
Note:
It should not be included in the Secure Hash.
ExpiryDateYear
Conditional

The customer’s card expiry date (year) digits that are used in the payment. The format of this parameter should be in the form (YY). This parameter is required if the sent PaymentMethod parameter is 1 (Card). 

  • Field Type: Numeric 
  • Length: 2
  • Sample Data: 17
Note:
It should not be included in the Secure Hash.
ExpiryDateMonth
Conditional
The customer’s card expiry date (month) digits are used in the payment. The format of this parameter should be in the form (MM). If the PaymentMethod parameter is 1 (Card) is sent, this parameter is required. 
  • Field Type: Numeric 
  • Length: 2
  • Sample Data: 02
Note:
It should not be included in the Secure Hash.
SecurityCode
Conditional
The customer’s card Security Code (e.g. CVV or CVC) depends on the Card Type used in the payment. If the PaymentMethod parameter is 1 (Card) is sent, this parameter is required. 
  • Field Type: Numeric 
  • Length: 4
  • Sample Data: 123
Note:
It should not be included in the Secure Hash.
CardHolderName
optional 
The customer’s cardholder name is used in the payment. If the PaymentMethod parameter is 1 (Card) is sent, this parameter is required. 
  • Field Type: Alphabetic
  • Length: 4
  • Sample Data: 123 
Note:
It should not be included in the Secure Hash. Spaces are allowed in the cardholder name.
PaymentDescription 
optional

An alphanumeric string that contains a narrative Payment Description of the invoice, which uses the language specified in the language parameter. This value should be UTF-8 encoded. It is entered into the secure hash generation process. 

  • Field Type: Alphanumeric
  • Length: 100
  • Sample Data: SamplePayment
Language
optional

An alphabetic value that represents the interface's language is displayed to the customer and used for the payment description parameter. SmartLink will use this value during the payment process to display the interface. Thus, supporting the selected language to the customer.

For example, Supported values are En, Ar. 

  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: En
ItemID
optional
An alphanumeric value that represents the custom item ID.
  • Field Type: Alphanumeric
  • Length: 25
  • Sample Data: Item1
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
Channel
optional

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

  • 0 for WEB
  • 1 for Mobile
  • 2 for POS
  • Field Type: Numeric
  • Length: 1
  • Sample Data: 0
Quantity
optional
A numeric value greater than ZERO represents the quantity of purchased Items.
  • Field Type: Numeric
  • Length: 5
  • Sample Data: 1
ResponseBackURL
optional
Merchant site response page URL that will receive the response from SmartRoute. It can help merchants have different response pages based on the requested service or other criteria.
GenerateToken 
optional

This flag indicates whether to generate a token for the entered card information or not. It accepts the values “Yes” and “No”. Sending this field as “No” acts like when the field is not sent at all. 

This parameter is a part of the tokenization. For more information, see Tokenization.

  • Field Type: Alphabetic
  • Length: 3
  • Sample Data: Yes
Token
optional
The token is used in this request; to represent a previously used card information. This parameter is a part of the tokenization parameters. For more information, see Tokenization.
  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: 17b61316feafe09feb806ce33cdbfc85aed1b4173ed604f8fd5fa3cf72a02e27 
AgreementID 
optional

The agreement Id represents a unique identifier for the agreement between the merchant and the payer where the payer authorizes the merchant to perform subsequent transactions (i.e. recurring) without their active participation. The subsequent transactions shall share the same agreement Id provided in this first transaction. The value is generated by the merchant and should be unique per recurring series. 

  • Field Type: Alphanumeric
  • Length: 20
  • Sample Data: 17b61316feafe09feb
Note:
The same value should be provided while performing a recurring payment across the recurring series for this payer.
AgreementType
optional

An alphabetic value that is used to distinguish if the recurring transaction initiated is of type unscheduled or recurring. Provide this value if the payment is first in a series of payments. 

Supported values are: 

  • Recurring 
  • Unscheduled
  • Other
  • Field Type: Alphanumeric
  • Length: -
  • Sample Data: Recurring
FailedResponseBackURL
optional
Merchant site Failed response page URL that will receive the failed response from SmartRoute. It can help merchants have different response pages based on the requested service or other criteria, if not set, the failed response will be sent to the URL set in (ResponseBackURL)

Response Parameters

ParameterDescription

Response.StatusCode 
required

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

Appendix A: Direct Post 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: 

  • 12 for Direct Post Verify   
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 12
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 – Direct Post Payment; for more information, see secure hash generation.

  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: e9fbb3c46ec9c7dec2a318edc283bbbea27bc5d7bf7da30f4f2e62b89df74a2e 
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.
  • 3 ➔ It will be ApplePay payment.
  • Field Type: Alphanumeric
  • Length: 42
  • Sample Data: 2
Condition:
The SmartRoute operation team, upon merchant enrollment, provides possible Card Names.  
Response.CardExpiryDate 
optional
An alphanumeric value that represents the expiry date of the card in MMYY format.
For example, 1221 for 12th December.
  • Field Type: Alphanumeric
  • Length: 4
  • Sample Data: 0416
Response.CardHolderName 
optional
An alphanumeric value that represents the cardholder name.
  • Field Type: Alphanumeric
  • Length: 32
  • Sample Data: FName LName 
Response.CardNumber 
optional
An alphanumeric value that represents the masked Card Number.
  • Field Type: Alphanumeric
  • Length: 19
  • Sample Data: 4747******123 
Response.GatewayStatusCode 
optional
An alphanumeric value that represents the gateway response code. This code covers errors generated by the chosen gateway. 
  • Field Type: Alphanumeric
  • Length: 15
  • Sample Data: 0000
Response.GatewayStatusDescription 
optional

An alphanumeric value that represents a message describing the response status received from the chosen gateway using the language specified in the request.

After completing the execution process, this parameter is filled in. This value should be UTF-8 encoded when it is entered into the secure hash generation process. 

  • Field Type: Alphanumeric
  • Length: 100
  • Sample Data: Sample Gateway Description 
Response.GatewayName 
optional
This value represents the gateway name that processed the transaction. It can be alphanumeric with special characters like space, ‘@’ and ‘_’.
  • Field Type: Alphanumeric and Some Special
  • Field Type: Alphanumeric and Some Special
  • Length: 40
  • Sample Data: TestGateway
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.ApprovalCode 
optional

Approval Code received from Payment Processor such as Visa. The values are returned in the following cases:

  • Only after a successful transaction
  • Value is provided from the gateway
  • Field Type: Alphanumeric
  • Length: 10
  • Sample Data: 12345678
Response.Token 
optional
The token that is assigned to the entered card information; responds to a “GenerateToken” flag with the value “Yes”. This parameter is a part of the tokenization parameters; for more information, see Tokenization.
  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: 17b61316feafe09feb806ce33cdbfc85aed1b4173ed604f8fd5fa3cf72a02e27
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.

What's Next