iFrame Payment Widget

Easily add an iframe to your website to allow payment authorisations from Mobicred

Instalment Widget

Overview

The Mobicred embedded payment widget is an iframe that can be dynamically generated and placed on your website in order to offer Mobicred as a checkout payment option without having to do direct integration with the Mobicred API.

By including the iframe on the relevant checkout page, and passing in the purchase price, your merchant information and some configuration options, the widget will handle everything else for you. You can tell the widget where to redirect the customer after the transaction has completed and fire off a webhook (using a callback URL) to your own internal backoffice system to process and authorise the transaction.

Configuration

The following parameters can be added to your iframe URL to customise and control the look and feel and configuration options of your payment widget. The required parameters are marked below with a * in the left column. All other parameters are optional and/or will inherit the system defaults.

Name Description Default Example
* slug Your merchant slug (supplied to you by Mobicred). merchant_name
* amount The amount you want to finance. 100
* orderNo Your internal order number / reference 1234
clientId A unique identifier for your customer (this is optional). 1
platform_id Which platform the iframe is rendering on. i.e desktop, mobile, tablet, app, etc. desktop mobile
version_id If you are running multiple versions of the widget, you can pass in the version number here. 1 1
env This paramter allows you to switch to a test version of the widget. If you don't pass in this parameter it will default to live live test
returnURL This tells the widget where to redirect customers once their transaction has been completed. Please encode this URL to avoid possible errors. We will attach the order_token, status, clientID, orderNo and amount parameters to this URL for you. If you do not pass in a returnURL, we will redirect you to our internal "outcome" page. internal https://pay.mobicred.co/transact/outcome
callbackURL This triggers a webhook to your desired endpoint to complete any internal processes you need to run. Please encode this URL to avoid possible errors. We will attach the order_token, status, clientID, orderNo, amount and pcMCReference parameters to this URL for you. If you do not pass in a callbackURL, will ignore this parameter.

If you do make use of the callback feature, please ensure that your callback response gives us a valid http status code (2xx for OK or 4xx or 5xx for a failure) so we can store this data and advise of the outcome.
https://pay.mobicred.co/transact/callback

Below is an example of how an iframe URL could be built up using all the available parameters:

https://pay.mobicred.co/embed/merchant_name/?amount=1&orderNo=1234&clientId=1&platform_id=desktop&version_id=2&callbackURL=https://pay.mobicred.co/transact/callback&env=test&returnURL=https://pay.mobicred.co/transact/outcome"
Mobicred Merchant Portal