Subscription notifications

If you have subscription products on your premium SMS short codes, you will need to configure a callback URL that we will invoke to notify you when users subscribe or unsubscribe from your products (currently supported on Safaricom).

To set up a callback url, click here

Every time a user subscribes or unsubscribes from a product, we will forward you the following information as POST variables:

Post parameter Description
phoneNumber Phone number to unsubscribe
shortCode The short code that has this product
keyword The keyword of the product that the user has unsubscribed from
updateType The type of the update. The values could be either addition or deletion
PHP sample code

 $phoneNumber = $_POST['phoneNumber'];
 $shortCode = $_POST['shortCode'];
 $keyword = $_POST['keyword'];
 $updateType = $_POST['updateType'];
 if($updateType == "Addition") {
  //Add phoneNumber to subscribers' list
 elseif($updateType == "Deletion") {
  //Remove phoneNumber from subscribers' list