Subscription Service

From ZDN Wiki

Subscription based text messaging services

Subscription services allow recurring billing over a period of time. A mobile consumer subscribes to your service at which point your application may start sending him text messages at a premium rate without further interaction required by him. He can terminate the subscription at any time by sending a special STOP keyword interpreted by Zong.

Most countries impose ceiling for the sum of all recurring charges over a monthly period. The US has a slightly different subscription model. Please go here to learn more.

Zong API exposes two callback handlers for which you can register URL's.

The subscription handler is called first when the mobile consumer starts the subscription process by sending a text message to your services keyword and shortcode. The subscription handler notifies your application of the intent to subscribe and your application can optionally refuse the subscription. The subscription handler is optional and if not present then the subscriber will be subscribed automatically. The subscription handler also gets a hit when the mobile consumer terminates his subscription, no further action is required.

The inbound message handler (SMS MO Handler) is also optional. If your application requires the receipt of additional inbound text message from your mobile consumers then you need to supply a URL and implement the handler as per the API Documentation.

Zong API makes several methods available for sending text messages to the subscribed mobile consumers. Please visit the API Documentation for a list of these.

Example flows for a subscription base service

Below are a few example of possible flows. In this example, by US law, a double opt-in process is required. You don't need to implement it as we take care of it for you. Your subscription handler will get hit only once the user has responded to the first text message with a positive response. For countries not requiring a double opt-in process, it will be left out.

Traffic alerts @ USD 9.99 per month

<- User sends the keyword traffic to the US shortcode 91010 (traffic)

-> ZAPI sends: The traffic service will be billed at USD 9.99/month until you send STOP. Other rates may apply, send Y to accept, STOP to end or HELP for info. <- User responds with Y

Your subscription handler gets a hit and responds with the following XML

<?xml version="1.0" encoding="UTF-8"?>
<subscription_response xmlns="http://api.zong.com/zapi/v1" subscribe="true" />

At this point the user is subscribed to the service and your application can start sending him text messages traffic alerts.

Your applications sends a traffic alert using the sendPremium() method -> User receives "Slow traffic on CA-280 North..... Send HELP to 91010 for help."

next day .... Your applications sends a traffic alert using the sendPremium() method -> User receives "Route 66 closed for roadwork ..... Send HELP to 91010 for help."

User only wants traffic info for California <- User sends traffic california to 91010

Your MO handler gets a hit with the message content california and your application updates its database accordingly.

next day..... Your applications sends a traffic alert using the sendPremium() method -> User receives "San Francisco Van Ness heavily congested, stay home ........ Send HELP to 91010 for help."

User decides to get a bicycle and wants to unsubscribe from your service <- User sends STOP traffic to 91010

User is unsubscribed and receives a text message at standard rate confirming that he is unsubscribed.

Your subscription handler gets a hit with the un-subscribe event