Completion
  • 28 Aug 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Completion

  • Dark
    Light
  • PDF

Article summary

This message is used as a complementary message for successful conducted Pre-Authorized transactions. This message is based on the API communication model described in the Communication Model section.

Request Parameters

ParameterDescription
MessageID
required

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

  • 5 for Completion Transaction  
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 5
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

OriginalTransactionID
required
The transaction ID of the original transaction needs to be completed.
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: 1440954863817
Amount
required
A numeric value 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
Important Note:
To release an already Pre-Authorized transaction, the merchant can send 0 (ZERO) value in the amount field provided within the Completion Message.

Therefore, if the provided amount within the Completion Message is 0 (ZERO), then SmartRoute will process the Completion request as a void request.
CurrencyISOCode
required
A numeric value 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
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 – Recurring Payment; for more information, see secure hash generation. 

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

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

  • 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: Refund 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 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.OriginalTransactionID  
required

The transaction ID of the original transaction needs to be voided.

  • Field Type: Alphanumeric
  • Length: 20
  • Sample Data: 1440594083737
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 response parameters appended in alphabetical order based on the parameter’s name, with no separators and no terminating character.

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

  • Field Type: Alphanumeric
  • Length: 64
  • Sample Data: e9fbb3c46ec9c7dec2a318edc283bbbea27bc5d7bf7da30f4f2e62b89df74a2e 
Response.MessageID 
required

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

  • 5 for Transection Completion  
  • Field Type: Alphanumeric
  • Length: 2
  • Sample Data: 5
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