Billing


Bill Subscriber

To bill a subscriber you need to send a HTTP POST to the endpoints below:


Endpoints

Production: https://api.suntech-solutions.net/billing/serve

Required headers

Header Name Value
Content-Type:

application/json

Parameters

Name Parameter Type Description Required Default Value
countrycode

String Destination country for the sms recipient. Optional
operation

String The current operation code(case sensitive). Required shortcode
apikey

String Suntech Api Key on Api Settings. Required
auth

String Suntech authentication. This is generated as per request. You sha256 encrypt the combination of Clientkey which shall be a preshared key issued and the recipient msisdn param below
Auth = sha256(ClientKey + Msisdn)
Required
reference

String Unique transaction reference for the transaction, you can use guid. Required
operator

String The mobile network to bill from. Optional
serviceid

String Shortcode to bill from(Subscriber must be subscribed to the service). Optional
msisdn

String The subscriber to bill. Required
amount

String The amount to bill. Required

Sample request

        
        {
            "countrycode": "ke",
            "apikey": "sergdf8ifd",
            "auth": "ltn3g2q6f37yhlglfhmn", 
            "operation": "bill",
            "operator": "telkom",
            "serviceid": "22000",
            "msisdn": "254710000000",
            "amount": "10",
            "reference": "SBQAVTBJK"
        }
        
	    

Response

Response comes as a JSON string with the following fields:

Parameter Parameter Type Description Values
status
string
The status code of the transaction 200
message
string
The description of the status code of the transaction Successful

Sample Reponse

Below is a sample send sms response for a successful request:

         	
	     {
            "status":"200",
            "message":"Successful" 
         }