Send Notifications
POST/v1/invoices/:id/notify_by/:mediumClick to copy
Use this endpoint to send notifications with the short URL to the customer via email or SMS.
Is this page helpful?
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/invoices/inv_DAuFuwWYU3R9tg/notify_by/sms \
Success
Failure
1{2"success": true3}
Path Parameters
id *
stringThe unique identifier of the invoice whose link is to be sent by SMS or email.
medium *
stringPossible values:
smsemail
Response Parameters
successbooleanIndicates whether the notifications were sent successfully. Possible values:
true: The notifications were successfully via SMS, email or both.false: The notifications were not sent.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
There is a mismatch between the API credentials passed in the API call and those generated on the Dashboard.
Solution
The id provided does not exist.
Error Status: 400
The invoice id entered is either invalid or does not belong to the requester account.
Solution
{medium} is not a valid communication medium.
Error Status: 400
The medium path parameter is not sms or email. The error echoes the actual invalid medium value.
Solution
Email can not be sent since email address has not been provided.
Error Status: 400
The notification request used medium=email but the invoice does not have a customer email address on file.
Solution
SMS can not be sent since contact number has not been provided.
Error Status: 400
The notification request used medium=sms but the invoice does not have a customer contact number on file.
Solution
Operation not allowed for Invoice in {draft|paid|expired|cancelled} status.
Error Status: 400
Notifications can only be sent for invoices in the issued or partially_paid state. The error message echoes the invoice's actual current status. For example, Operation not allowed for Invoice in cancelled status.
Solution
Send Notifications
POST/v1/invoices/:id/notify_by/:mediumClick to copy
Use this endpoint to send notifications with the short URL to the customer via email or SMS.
Is this page helpful?
Path Parameters
id *
stringThe unique identifier of the invoice whose link is to be sent by SMS or email.
medium *
stringPossible values:
smsemail
Response Parameters
successbooleanIndicates whether the notifications were sent successfully. Possible values:
true: The notifications were successfully via SMS, email or both.false: The notifications were not sent.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
There is a mismatch between the API credentials passed in the API call and those generated on the Dashboard.
Solution
The id provided does not exist.
Error Status: 400
The invoice id entered is either invalid or does not belong to the requester account.
Solution
{medium} is not a valid communication medium.
Error Status: 400
The medium path parameter is not sms or email. The error echoes the actual invalid medium value.
Solution
Email can not be sent since email address has not been provided.
Error Status: 400
The notification request used medium=email but the invoice does not have a customer email address on file.
Solution
SMS can not be sent since contact number has not been provided.
Error Status: 400
The notification request used medium=sms but the invoice does not have a customer contact number on file.
Solution
Operation not allowed for Invoice in {draft|paid|expired|cancelled} status.
Error Status: 400
Notifications can only be sent for invoices in the issued or partially_paid state. The error message echoes the invoice's actual current status. For example, Operation not allowed for Invoice in cancelled status.
Solution
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/invoices/inv_DAuFuwWYU3R9tg/notify_by/sms \
Success
Failure
1{2"success": true3}