Send Invoice QR to SMS API

The Send Invoice QR to SMS API is used to send SMS to provided phoneNumber post transaction. Whenever payment is success/fail via SDK, merchant will call this API to send the payment confirmation SMS to merchant’s executive phone number.

Request parameters

ParameterDescriptionSample Value
string This parameter must include the merchant key that was provided by PayU.
Reference: For more information on how to generate the Key and Salt, refer to any of the following:

Production: Generate Production Merchant Key and Sat.
Test: Generate Test Merchant Key and Salt.
Your Test Key
string The parameter must contain the name of the web service. For this API, send_sdk_message must be posted.send_sdk_message
string This parameter must contain the hash value to be calculated at your end. The string used for calculating the hash is mentioned below:

sha512 is the encryption method used here.
string This parameter must contain the merchant PayU ID that was provided by PayU.412345678912356095
string This parameter must contain the merchant phone number to which the invoice is sent as SMS.7727820112

Sample request

curl --location --request POST '' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'command=send_sdk_message' \
--data-urlencode 'key=J****g' \
--data-urlencode 'hash=602a7b58b239e6bdbf762f01cada3652a25b0de0002445dbed69febb652b9c376375b1322b531116cd0a1bee37cdc8ef8a393e066b4c9a836ea4c6c45ff90460' \
--data-urlencode 'var1=13863413996' \
--data-urlencode 'var2=9833208174'

Response parameters

statusThis parameter returns the status of web service call. The status can be any of the following:

0 - If web service call failed.
1 - If web service call succeeded
msgThis parameter returns the following message if the SMS was sent successfully:
sms request successful

Sample response

Success scenario

a:2:{s:6:"status";i:1;s:3:"msg";s:18:"sms request successful";}

Failure scenario

  • SMS request failed
a:2:{s:6:"status";i:0;s:3:"msg";s:18:"sms request failed";}
  • Invalid phone number
a:2:{s:6:"status";i:0;s:3:"msg";s:20:"phone is not numeric";}
  • Invalid PayU ID
a:2:{s:6:"status";i:0;s:3:"msg";s:59:"There is no success or failed transaction with given payuId";}