sms:bank

sms:bank

Not sure which service might be the right one? Please visit our service comparison page!

Pay attention to off-the-shelf SMS scripts library as well.

Technical info

sms:bank service is implemented like a transaction gateway; the end user initiates transaction by submitting the form found on your website, and afterwards makes the payment itself by sending an SMS with certain text to the given number. In this kind of implementation there are at least three key-points:

  • Form that initiates the transaction;
  • Payment status pages (Success URL and Fail URL, to which messages informing of successful operation or error accordingly; must be provided during the setup);
  • Payment result processor (Result URL, which is used for informing of fulfilled operations; must be provided during the setup).
Please note that for sms:bank installation process you will need to use one of the programming languages, for example PHP.

Implementation details

Form that initiates the transaction

An example of HTML-markup form that gives the user an opportunity to initiate the transaction is given below.

<form action="http://bank.smscoin.com/bank/" method="POST">
<input name="s_purse" type="hidden" value="1" />
<input name="s_order_id" type="hidden" value="1234" />
<input name="s_amount" type="hidden" value="0.1" />
<input name="s_clear_amount" type="hidden" value="0" />
<input name="s_description" type="hidden" value="Demo payment" />
<input name="s_sign" type="hidden" value="0123456789abcdef0123456789abcdef" />
<input type="submit" value="Pay" />
</form>

Your implementation might be quite different from the one shown below. You can add your own fields as well. In any case the server must accept the following parameters:

 

Please note that when adding new parameters in payment form, do not use s_ parameter, as this prefix is reserved for SmsCoin project and cannot be used for adding new parameters.
Parameter Type Description
s_purse int Your sms:bank ID in the system
s_order_id int Operation id (any number; used primarily in order to differ one operation's results from another)
s_amount float The payment amount, USD
s_clear_amount int(1) End user fee calculation algorithm. If 0, then s_amount is the end user price, otherwise the s_amount is your profit from the operation; the price user pays is varied due to rate issues in different countries.
s_description char(127) Operation description (arbitrary line, not longer then 127 characters, serves as a convenient method for distinguishing target payments). Processed as UTF-8.
s_sign char(32) MD5 hash lines conjoined through double ("::") s_purse, s_order_id, s_amount, s_clear_amount, s_description and secret_code parameters (in that order), where secret_code is your sms:bank secret code.
If the value of s_amount does exceed the rate available in one country or another, such country is automatically excluded from the list of the countries served by your sms:bank.

Interface language setup

In all our services Russian is used as default language. In case some of your users are not Russian speakers, or for some reason you decide to change the default language, simply replace the following address

http://bank.smscoin.com/bank/

with

http://bank.smscoin.com/language/english/bank/

Instead of english you can specify any supported language of your choice.

Payment status pages

Payment status pages should accept the following parameters:

Parameter Type Description
s_purse int Your sms:bank ID in the system
s_order_id int Operation id (any number; used primarily in order to compare initiated transaction with its' result)
s_amount float The exact payment amount, with fee calculations applied (see below), USD
s_clear_amount int(1) End user fee calculation algorithm. If 0, then s_amount is the end user price, otherwise the s_amount is your profit from the operation; the price user pays is varied due to different rates issues in different countries.
s_status int(1) The payment status: 1 if success, 0 failed.
s_sign char(32) MD5 hash lines conjoined through double ("::") secret_code, s_purse, s_order_id, s_amount, s_clear_amount and s_status parameters (in that order), where secret_code is your sms:bank secret code.

Payment result handler

Payment result processor should accept the following parameters:

Parameter Type Description
s_purse int Your sms:bank id.
s_order_id int Operation id (any number; used primarily in order to compare initiated transaction with its' result).
s_amount float The exact payment amount, with fee calculations applied (see below), USD
s_clear_amount int(1) End user fee calculation algorithm. If 0, then s_amount is the end user price, otherwise the s_amount is your profit from the operation; the price user pays is varied due to rate issues in different countries.
s_inv int Order number of an operation
s_phone char(32) Phone number from which the operation was confirmed
s_sign_v2 char(32) MD5 hash lines conjoined through double ("::") secret_code, s_purse, s_order_id, s_amount, s_clear_amount, s_inv and s_phone parameters (in that order), where secret_code is your sms:bank secret code.

 

Samples and source code

You can find an example of the service here.

Download source code in PHP, Perl, ASP.NET, Python.

Code example for rates scale in XML and JSON format can be downloaded here.

Please note: code samples are purely illustrative, and thereby their use in production environments without substantial revision is highly unadvised.

FAQ

When I click the address specified in service settings, I receive an error message.

You do not need to click the address specified in service settings; instead, this address must be specified in parameter of the action form which initiates the transaction. Code which generates the form is stored in code examples (see above).

There are no countries in the list on the payment page.

Please make sure that the cost entered corresponds to the rates available in the countries of your choice (SMS cost cannot be higher than maximum rate available in all the countries).

How can I add more fields to transaction initialization form?

This option is already integrated. Fields shown as an example in transaction initialization form are necessary. You can add your own fields to the form, which will be transferred to your server in a reply. If your order number contains alphabetical characters or exceeds int, please use additional field to transfer it. The total limit of all pairs "field-value" is 155 characters.

I'm in the process of connecting sms:bank, and I don't understand which addresses need to be entered in Success URL and Result URL fields.

Fail URL is an address on your website user will get to from our gateway in case of payment failure;
Success URL is an address on your website user will get to from our gateway following successful payment process;
Result URL is an address of the handler on your website, where the parameters of each SMS-message received for your sms:bank are transferred from our server. Unlike Fail URL and Success URL, user do not reach this address, and script should be placed here.

Share |