# Premium SMS Server API
# Payment channel
channel | Description | Currency |
---|---|---|
psms | Premium SMS | THB |
# Supported operators
Operator | Telco name | Currency |
---|---|---|
TRUEMOVEH | TRUEMOVEH | THB |
DTAC | DTAC | THB |
AIS | AIS | THB |
TIP
Define telco to "operator" parameter in Payment request,
eg. &channe=psms&operator=TRUEMOVEH
# Limits
PREPAID | Daily Limit (THB) | Monthly Limit (THB) |
---|---|---|
TRUEMOVEH | 5,000 | 20,000 |
DTAC | 5,000 | 20,000 |
AIS | 5,000 | 20,000 |
POSTPAID | Daily Limit (THB) | Monthly Limit (THB) |
---|---|---|
TRUEMOVEH | 300 | 300 |
DTAC | 300 | 300 |
AIS | 300 | 300 |
# Available prices
Operator | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
TRUEMOVEH | 5 | 10 | 20 | 30 | 50 | 30 | 90 | 100 | 150 | 200 | 300 | 500 |
DTAC | 5 | 10 | 20 | 30 | 50 | 30 | 90 | 100 | 150 | 200 | 300 | 500 |
AIS | 5 | 10 | 20 | 30 | 50 | 30 | 90 | 100 | 150 | 200 | 300 | 500 |
# Sequence Diagram
# Payment Request
Important Security Update: Transitioning from MD5 to HMAC-SHA256
We are committed to maintaining the highest standards of security and ensuring the integrity and confidentiality of your data. As part of our ongoing security enhancements, we will be upgrading our cryptographic hash for the "sig" parameter from MD5 to HMAC-SHA256.
What This Means for You:
- Enhanced Security: HMAC-SHA256 provides stronger security features and is less susceptible to vulnerabilities, ensuring your data remains secure.
- Action Required: If you are currently using the MD5 to generate a signature in your request payload OR Payment result notification, you will need to update your request payload to use HMAC-SHA256.
- Timeline: The transition will take place on December 31, 2024. Please ensure your request payload are updated before this date to avoid any service disruptions.
Method | Request URL |
---|---|
GET | /sms/pay/s2s |
Parameters Name | Description | Optional | Example |
---|---|---|---|
for | Virtual goods or virtual credit name | No | 1000 Razer Gold |
sid | Service ID provided by Razer Thailand | No | 9919 |
channel | psms | No | psms |
price | Price Point with currency without tax | No | 100 THB |
orderid | Unique Merchant Transtion ID Maximum 32 character | No | cc4b371b5e089588cec479283adbxxxx |
uid | ID of customer or userID. Can be text, number or email Maximum 50 character | No | [email protected] |
operator | Network Operator | Yes | AIS |
sig | Detail about sig | No | 22d888d04290606231f9185d012ee52b |
hashType | Hash type of "sig" parameter. Value must be "hmac-sha256" for SHA256 signature, Otherwise the signature will be validated in MD5 as a default | Yes | hmac-sha256 |
Example of Payment Request
/sms/pay/s2s?for=1000%20Razer%20Gold&
channel=psms&operator=&orderid=cc4b371 b5e089588cec479283adbxxxx&
price=100THB&sid=9919&[email protected]&
sig=22d888d04290606231f9185d012ee52b
Example of Payment Request Response
{
"code":200,
"message":"Success",
"orderid":"cc4b371b5e089588cec479283adbxxxx",
"price":"100",
"currency":"THB",
"short_code":"4210410",
"sms_text":"9919 b9144f9e462dcafd5f407457865e9704"
}
# Payment Result
Important Security Update: Transitioning from MD5 to HMAC-SHA256
We are committed to maintaining the highest standards of security and ensuring the integrity and confidentiality of your data. As part of our ongoing security enhancements, we will be upgrading our cryptographic hash for the "sig" parameter from MD5 to HMAC-SHA256.
What This Means for You:
- Enhanced Security: HMAC-SHA256 provides stronger security features and is less susceptible to vulnerabilities, ensuring your data remains secure.
- Action Required: If you are currently using the MD5 to generate a signature in your request payload OR Payment result notification, you will need to update your request payload to use HMAC-SHA256.
- Timeline: The transition will take place on December 31, 2024. Please ensure your request payload are updated before this date to avoid any service disruptions.
Method | Request URL |
---|---|
GET | https://partner-domain-or-ip/path/payment-notification-handler |
Parameters Name | Description | Example |
---|---|---|
txid | virtual goods or virtual credit name | b9144f9e462dcafd5f407457865e9704 |
orderid | Transaction ID from Payment Request | cc4b371b5e089588cec479283adbxxxx |
status | Payment Status | 200 |
detail | Detail of status | Success |
channel | psms | psms |
amount | Payment amount | 100 |
Currency | Payment currency | THB |
Operator | Network Operator | AIS |
nType | Mobile Network Type ( PREPAID ,POSTPAID ,UNKNOWN ) | PREPAID |
msisdn | Customer's phone number | 6686279XXXX |
sig | Detail about sig | 97fa2ec45f239d5e322c89f114e5xxxx |
hashType | Hash type of "sig" parameter. Value must be "hmac-sha256" for SHA256 signature, Otherwise the signature will be validated in MD5 as a default | hmac-sha256 |
Example of Payment Result
https://partner-domain-or-ip/path/payment-notification-handler?
txid=b9144f9e462dcafd5f407457865e9704&orderid=cc4b371b5e089588cec479283adbxxxx&
status=200&detail=Success&channel=psms&amount=100¤cy=THB&
operator=AIS&ntype=PREPAID&msisdn=6686279XXXX&
sig=97fa2ec45f239d5e322c89f114e5xxxx
Example of Payment Result Response
{
txid : "b9144f9e462dcafd5f407457865e9704",
status: "200",
detail : "success"
}
# Status code
Code | Detail |
---|---|
200 | Success |
600 | Insufficient Balance |
603 | Transaction expired |
610 | Too many request per minute |
613 | Your mobile billing type is not allowed |
614 | User has been blocked |
615 | Wrong code or service ID |
622 | Exceeded monthly limit |
609 | Provider return failed |