Send SMS
Signature SMS
All requests that enter espay system will be signature validated. Signature sent on each request with signature parameters. Each signature will be hashed using sha256 algorithm. The signature will be generated by multiplying some values from the previous value parameter and with a key provided by espay. Signature formats differ from any service. Each parameter will be started, separated, and terminated with ##. All values will be changed to uppercase. The signature sequence order as follows:
- sender_id
- rq_uuid
- message_type
- phone_number
- signaturekey
So the signature merge format will be as follows
#sender_id#rq_uuid#message_type#phone_number#signaturekey#
Generated signature example
First format
#SGOPLUS#smspr-test-011#SMS#6281218816222#
Change to uppercase
#SGOPLUS#SMSPR-TEST-011#SMS#6281218816222#
Add the signature key
#SGOPLUS#SMSPR-TEST-011#SMS#6281218816222#sgoplus201711aa#
Hash with sha256 algorithm
3ac657060474d31095e27eb49699098c81b317ca9d34e39489c9f77ba80ab758
API URL
development: https://sandbox-api.espay.id/btext/send/outgoing
production: https://api.espay.id/btext/send/outgoing
Send SMS
Parameter request
Parameter Name | Attribute | Mandatory | Description |
rq_uuid | 64 | Yes | Request identifier. Unique id to identify these messages with other messages |
sender_id | 32 | Yes | Sender Identifier, will be given by espay. |
message_type | 3 | Yes | Fill fix value = SMS |
phone_number | 14 | Yes | Receiver cell number |
message | 200 | Yes | Request message text |
signature | 64 | Yes | Signature (see signature algorithm) |
Parameter Response
Parameter Name | Attribute | Mandatory | Description |
rq_uuid | 64 | Yes | Request identifier. Unique id to identify these messages with other messages |
rs_datetime | 19 | Yes | Transaction date in application server Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
error_code | 4 | Yes | Error code |
error_message | Yes | Error description |
Error Code List
Error Code | Error Message |
0000 | success |
0041 | Invalid Recipient |
0601 | IP Address Rejected / Unregistered |
0001 | invalid request |
0096 | invalid message type |
0050 | Parameters Should be not empty |
0015 | Unable to process, please contact your administrator |
0401 | Action decline |
800 | Insufficient balance |
0011 | Invalid signature |