Integration steps

Fortumo Web SDK integration is designed to be extremely simple and straightforward. The payment flow uses Premium SMS messages and HTTP requests to process payments.

Payment is considered to be successful after Fortumo server has sent HTTP request to your receipt verification URL. After your server has received the request from Fortumo with payment status=completed, your back end should notify your front end of successful payment and grant virtual goods to the end-user.

To offer the best payment experience on all platforms, the Web SDK has customized user interface for different platforms (web, mobile)

Add JavaScript and HTML code to your project.

Reference our JavaScript library

Mobile Payments for Web Apps uses jQuery version 1.7.1. If you are also using jQuery you have to use jQuery.noConflict(). For more information check here.

1
<script src="https://assets.fortumo.com/fmp/fortumopay.js" type="text/javascript"></script>

Create a payment button

You can connect payment with particular resource (i.e user) of your system by putting its ID (separated by “/”) to the end of serviceID inside the button “rel” attribute. This ID will be included in the reply requests to your server with parameter cuid. Note that the CUID value needs to be URL encoded.

This parameter can also be used as a part of the target URL of the “Return to merchant” button (displayed at the end of the payment process). If this URL (specified in the service settings) contains a string “CUID” (case-sensitive), it will be replaced with the cuid parameter value you provided to the payment widget.

1
2
3
<a id="fmp-button" href="#" rel="YOUR SERVICE ID HERE/userId123">
<img src="https://assets.fortumo.com/fmp/fortumopay_150x50_red.png" width="150" height="50" alt="Mobile Payments by Fortumo" border="0" />
</a>

You can also add it as custom parameter to the end of serviceID (separated by "?").

1
2
3
<a id="fmp-button" href="#" rel="YOUR SERVICE ID HERE?cuid=userId123">
<img src="https://assets.fortumo.com/fmp/fortumopay_150x50_red.png" width="150" height="50" alt="Mobile Payments by Fortumo" border="0" />
</a>

Add custom initialization parameters

Custom parameters can, for example, be used when virtual currency name and exchange rate should be defined on the fly. For example you may want to skip the credit selection step, use different virtual currencies in one single payment flow or provide a better rate for higher tariffs.

Make sure end-users always initiate payment through WebSDK payment window

For many connections end-users are directed to send a message to a specific shortcode. If they send the SMS without completing the payment flow in WebSDK they will not get the service. Please emphasize this to your end users in your page.

Help us improve our Merchants Portal. Was this article helpful?