SMS payments: how it works

Why SMS payments?


Now you will not surprise anyone with the possibility of paying for services by sending an SMS message to a specific “short number”. Even the person farthest from the Internet could hear on TV: “Send an SMS to XXXX to vote for YYYY”, and at the bottom of the screen see the inscription: “* sending cost 30 rubles”. Below I will tell you how it works.

pros

Why is this payment method so good? Here are the main, in my opinion, arguments:
  1. Convenience of payment
    Today, almost every resident of the country has a mobile phone, which means that almost everyone has the possibility of this method of payment. To use it, a minimum of gestures is required: take the phone and type a small text, and if payment comes from a mobile application (for example, a game), then usually the user only needs to click the OK button a couple of times - the application will generate and send an SMS message.
    Despite the fact that most of the amount that is debited from the subscriber’s account goes to the operator’s pocket, the size of the available audience more than covers this difference: even if we assume that the seller receives one third of the cost of SMS, it’s enough to have only three times more than the audience required to earn the same amounts using direct (no commission) payment methods.
  2. Convenience of payment
    processing Processing of SMS payments can be fully automated. And if the provision of a sold service can also be automated, then this means that the entire process can be fully automated.


Minuses

  1. A small percentage
    Unfortunately, in the best case (for the seller), 40% of the SMS cost goes to the operator, and since there can be several more intermediaries between the seller and the operator (more on that below), then, ultimately, the seller can receive, say, everything 10-20% of the cost.
  2. Fixed cost
    The cost of sending an SMS message to a short number is determined in advance at the operator’s level, so the only way to differentiate the amount of payment is to use several short numbers with different costs.
  3. [UPDATE:] Increased probability of failure
    Since the message path can be quite long (2-3 hops), there is an increased (offhand, about 0.1%) probability of failure of SMS delivery. With each such case, you have to deal with the "manual" mode, which again can be difficult, because first you need to find out at what stage the failure occurred. If the subscriber calls the operator, then the problem "descends" until there is a place of failure. If the subscriber contacts the seller, then the problem on the contrary "rises" towards the operator. It is often easier to return the money to the subscriber than to understand, and what actually happened.


SMS life cycle



Tariff types

There are two types of charging:
  • MO-tariffing (“Mobile Originated”)
    The cost is debited from the subscriber’s account at the time of sending an SMS message to a specific short number.
  • MT-tariffing (“Mobile Terminated”)
    The cost is debited from the subscriber’s account at the time of receiving the SMS message.
    More precisely, the user first sends an SMS to a short number (money is not charged for this), then it is checked whether the subscriber has enough money to pay for the service and whether the seller is ready to provide this service. If all is well, then a message is sent to the subscriber, for which a fee is charged.

Which type of charging is used in a particular case depends on the country, operator, short number.
[UPGRADE:] Fixed a bug in the MO schema
SMS Life Cycle in MO
MT SMS Life Cycle

Payment Network Agents

  1. Operators
    Clear business, these are those who provide communication services to subscribers. To provide services, each operator allocates a number of short numbers that it rents out. The short number is relevant only to the operator to which the given subscriber is connected, i.e. An SMS message to a short number is processed only by this telecom operator. The operator "plucks" the lion's share of the cost of SMS.
  2. Aggregators
    Operators are usually not interested in dealing with individual sellers, because they need constant and large SMS traffic, therefore, operators agree with aggregators who are intermediaries between them and sellers.
    It is advisable for the aggregator that SMS messages to the short number XXXX reach him regardless of which subscriber the operator is (otherwise it will be necessary to force the subscriber to find out which operator he has and choose the appropriate short number independently), therefore he separately agrees with each operator and takes from them for rent number XXXX. Naturally, if one of the popular operators does not want to rent the necessary number, it is more profitable for the aggregator to look for another number, to which most operators will agree.
    The operator and the aggregator agree on the cost of short numbers among themselves and on the share of each in the cost of SMS. Naturally, the aggregator needs the cost of the same short number for different operators to be at least approximately the same, but there will always be a slight difference. For one operator, the same short number can cost, for example, 150 rubles, and for another - 165.
  3. Sub-
    aggregators Aggregators, in fact, are also not always profitable to work directly with sellers, so they can negotiate with sub-aggregators.
    A sub-aggregator usually negotiates with one or more aggregators on the one hand (for example, because different aggregators may have different coverage by country and different tariff networks), and on the other, with sellers. For example, a sub-aggregator may be some affiliate system that does not sell independently, but through its partners. The sub-aggregator and the aggregator agree among themselves how they share the cost of the SMS remaining after the operator took their share.
    Of course, nothing interferes with the existence of sub-sub-aggregators, etc., but since at each stage a significant chunk is “plucked” from the residual value of SMS, there is a reasonable restriction to this process.
  4. Sellers
    Actually - those who directly provide services, the final link in the chain. Sellers negotiate with the (sub-) aggregator for their share of SMS.


Methods for determining the cost and destination of an SMS payment

Usually, the cost and destination aggregator of an SMS message is determined only by the short number to which it was sent, but in fact this does not always happen. In some cases, it is determined by the contents of the SMS text. The aggregator may agree with the operator that the cost of SMS to this number will be determined by the so-called "prefix" - a pre-agreed combination of characters at the beginning of the SMS text. For example, it may be decided that all SMS messages to XXXX starting with the text “AGREG1” or “AGREG2” go to this aggregator, the first ones will cost $ 1 and the second will cost $ 2.

Since the aggregator has a limited number of numbers, it usually agrees with the sub-aggregator that SMS will be sent to it, from certain short numbers and starting with the prefix attached to it, for example, “SUB”. In the case when the cost is set by the prefix, it can be two-syllable, for example, “AGREG1 SUB” (the text that is significant for the sub-aggregator follows).

In turn, the sub-aggregator can also calculate the seller by the next level prefix (“AGREG1 SUB SELLER1”), or somehow encrypt the seller’s identifier in the SMS body.

Full identification of the addressee and cost of SMS is determined by the parameters:
Country - Operator - Short number - SMS text.

Technical details


Subpartner Interface

As a rule, all network agents, starting from the operator and ending with the sub-aggregator, provide their sub-partners with a tool for receiving statistics on SMS payments. Usually it is made in the form of a site on which the sub-partner can register, start up his projects, see the current statistics of SMS and income, receive various reports.

Transport system

In addition to the user interface, operators and aggregators (and sometimes subaggregators) provide a program interface for two-way interaction. This interface is implemented in the form of web scripts that make http (s) requests to each other if it is necessary to transfer any information.

Consider the example of the interaction of the aggregator and subaggregator.
Each aggregator uses its own protocol and provides its own set of capabilities, there is no standard protocol, but there is a set of standard data that is somehow provided by the aggregator to the sub-partner when receiving an SMS message:
  • SMS text message
    In some cases, the text may be delivered without a prefix, or the prefix may be delivered in a separate field
  • Short number The
    number to which the message was sent. Required to determine the cost and type of service.
  • Country The
    service can be provided in different countries, which means at different prices. Sometimes a country has to be identified by the identifier of the operator.
  • Operator
    A certain identifier for the operator. Different operators have different prices.


Other possible data:
  • Session ID
    Provided by most aggregators. Used to determine which of the user’s requests we are currently processing. For example, for MT billing, the first request may contain a description of the SMS and session ID, and the second - a delivery report - only the session ID and payment status (delivered / canceled / expected).
    Session ID can also be used when responding from a sub-aggregator to an aggregator. The fact is that more often aggregators receive a response immediately as a result of an http request (i.e., the aggregator server makes an http request to the subaggregator server, in response to it, the subaggregator sends the result of processing the requests), but sometimes the aggregator does not require the same answer the request, but in the opposite parallel (that is, having received the request from the aggregator, the sub-aggregator immediately answers “OK, received”, then processes it and already makes a new http-request to the aggregator server, in which it sends the real result plus the session ID so that it was clear what kind of SMS message and there is a speech).
  • Subscriber's phone number
    Sometimes provided in full, sometimes partially, sometimes not at all
  • Caller ID
    Provided by some systems as an internal (for the aggregator) caller ID.

  • Attempt number Sometimes, the aggregator cannot reach the subaggregator server the first time, then it can repeat the same request after a while, but specify a new connection attempt number (0 - for the first attempt, 1 - for the second, etc.). If for a certain period the aggregator did not reach the sub-aggregator, then it can cancel the payment processing.
  • Request execution time
    It may be necessary to more accurately identify the message if the time on the aggregator and subaggregator server is not synchronized.


In addition, the following may be transmitted: internal (for the aggregator) short number identifier, tariff identifier, full cost of SMS, sub-aggregator income, currency in which the payment was made, and so on.

In response, the sub-aggregator usually sends an SMS text that must be sent to the subscriber and / or a description of the error.

Some aggregators allow a sub-aggregator to send SMS messages when it needs to (not in response to a subscriber’s SMS, but as a distribution) to a specified number, but the fee is already charged from the sub-aggregator itself. Also, some aggregators allow you to split the response into several messages.

Communication Security

For communication security, the following methods are used:
  • Using encrypted protocols
  • Encrypt request text using a predefined password
  • Passing a predefined password in the request text without using encryption
  • Passing an MD5 hash from a predefined list of fields including a password
  • Limit the list of IPs from which requests can be received


Instead of a conclusion.


Of course, in my article I did not indicate all the possible nuances, and I said some things very vaguely, but I tried to give a theoretical basis, which is quite enough to see the system from a bird's eye view, and use as a guide to action.

Thanks for attention!

Also popular now: