Current Version: 0.9.8


mojoReq(js)
(formerly known as mojoCheckout(js)

A small (2.6kb - minified) jQuery plugin setup instant payments with Instamojo for any type of webpage — includes Blogger.

Web browser compatible, this plugin uses jQuery Ajax, which makes it possible to communicate to other domain using any web browser — even on mobile devices.

Widely used on BlogrCart Blogger e-commerce themes — create online web stores super easy (and blog too) without any programming knowledge.

Integrate with any type of shopping cart or create a 1 time payment request with various payment options to choose — secured & safe provided by the awesome people at Instamojo.


New


Encrypted secret keys. — All sensitive secret keys encrypted before deploying requests for added security.



Features


Instamojo Payment Gateway

  • Free signup — less then 60 seconds.
  • No personal or banking data exposed.
  • Pay only when you sell with — no upfronts.
  • Easy personalize payment links via @username.
  • Send payment request via Whatsapp app.
  • Send payment notification via email & SMS notifications.
  • Transparent, acceptable & honest fees.
  • Accepts major credit cards, digital wallets, net-banking & over 40 banking institutions..
  • And loads more...

mojoReq(js) jQuery Plugin

  • Easy implementation & setup — Plug & Play.
  • No database.
  • No personal data exposed.
  • Small plugin size.
  • Ability to create a 1-off payment or send shopping cart data.
  • Install on static or dynamic webpages.
  • Ability to obfuscate secret data.
  • Settings & options overrides.
  • Includes 3 Instamojo checkout presets — instant, light & floating checkout.
  • Added custom checkout to create your own.
  • Enable/disable send email & SMS notification for abandoned checkout.
  • Human readable & referenced plug-ins mark-up.
  • Error handling available.
  • And loads more...

Basic Web Page Requirement


  • jQuery 1.11.++ library
  • Minimal HTML/javascript knowledge.

Basic Setup

Check jQuery Availability & Version


<script src='//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js'/>
</head>  

#1 Create Form


<form>
  <label>Name</label>
  <input name="name" type="text"/>
  <label>Email</label>
  <input name="email" type="email"/>
  <label>Phone</label>
  <input name="phone" type="text"/>
  <button class="unique-classname" type="button">Pay with Instamojo</button>
</form>

#2 Include Plugin


<script>
// include plugin in webpage
;(function($){
    'use strict'
    $.fn.mojoReq = function ( options ){

        ... plugin codes ...

    };
})(jQuery);
</script>

#3 Initialize Plugin


<script>
$(function(){
    // setup Instamojo secret keys (please obfuscate)
    $.fn.mojoReq.defaults.data.api_key = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
</script>
<script>
$(function(){
   $('.unique-classname').on( 'click' , function( event ){
        event.preventDefault();
        $(this).mojoReq({
            sandbox	: false,
            amount	: '1000.00',
            purpose 	: 'Download Awesome Blogger Theme',
            redirect_url: 'https://your.domain.name/success-page.html',
        });
    });
});
</script>


How Does It Work?


  • Send web page payment requests data to Instamojo. $.fn.mojoReq(js)
  • Instamojo process & verifies payment requests data. instamojo website
  • Instamojo verified payment requests data sent to your web page. instamojo website
  • Handle your checkout using the verified payment requests data. $.fn.mojoReq(js)

So... What Do You Need?


  • Your Instamojo api_key.
  • Your Instamojo auth_token.
  • Use mojoReq(js) public bridge or self-host your own instamojo.php.
  • Some patience...
Important: Please do not reveal your Instamojo info to the general public. More info in plug-in details.

Instamojo Checkout Examples

Utilizes Instamojo API's with added custom checkout functionalities to create your own awesome checkout experience. For demo purposes, no form data saved.



Default Checkout

Checkout to Instamojo. Form fields (if available) passed to checkout page.

Price: Rp100.00



Patience when processing...


<script>
// your secret keys (please obfuscate)
$(function(){
    $.fn.mojoReq.defaults.data.api_key    = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
});
</script>
<script>
$(function(){
    $('.unique-classname_1').on( 'click' , function( event ){
        event.preventDefault();
        $(this).mojoReq({
            // required setup
            sandbox      : true,
            data: {
              amount       : '100.00',
              purpose      : 'Payment description/purpose',
              redirect_url : 'https://your.domain.name/success.html'
            }
        });
    });
});
</script>


Light Checkout

Checkout directly to payment page at Instamojo. Form fields required.

Price: Rp250.00



Patience when processing...

<script>
// your secret keys (please obfuscate)
$(function(){
    $.fn.mojoReq.defaults.data.api_key    = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
});
</script>
<script>
$(function(){
    $('.unique-classname_2').on( 'click' , function( event ){
        event.preventDefault();
        $(this).mojoReq({
            sandbox      : true,
            data: {
                buyer_name : $('[name=buyer_name]').val(),
                email      : $('[name=email]').val(),
                phone      : $('[name=phone]').val().
                amount       : '250.00',
                purpose      : 'Payment description/purpose',
                redirect_url : 'https://your.domain.name/success.html',
            },
            checkout_type: 'light'
         });
    });
});
</script>


Floating Checkout

Pay at Instamojo at your own website! Form name, email, phone fields is required.

Price: Rp500.00



Patience when processing...

<script>
// your secret keys (please obfuscate)
$(function(){
    $.fn.mojoReq.defaults.data.api_key    = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
});
</script>
<script>
$(function(){
    $('.unique-classname_3').on( 'click' , function( event ){
        event.preventDefault();
        $(this).mojoReq({
            sandbox      : true,
            data: {
                buyer_name : $('[name=buyer_name]').val(),
                email      : $('[name=email]').val(),
                phone      : $('[name=phone]').val(),
                amount       : '500.00',
                purpose      : 'Payment description/purpose',
                redirect_url : 'http://your.domain.name/success.html'
            },
            checkout_type: 'floating',
            floating_container: $('.unique-form-3')
         });
    });
});
</script>


Custom Checkout

Customize to create your own checkout experience. Access data received from Instamojo.

Price: Rp1000.00



Patience when processing...

<script>
// your secret keys (please obfuscate)
$(function(){
    $.fn.mojoReq.defaults.data.api_key    = 'YOUR-API-KEY';
    $.fn.mojoReq.defaults.data.auth_token = 'YOUR-AUTH-TOKEN';
});
</script>
<script>
$(function(){
    $('.unique-classname_4').on( 'click' , function( event ){
        event.preventDefault();
        $(this).mojoReq({
            sandbox      : true,
            data: {
                buyer_name : $('[name=buyer_name]').val(),
                email      : $('[name=email]').val(),
                phone      : $('[name=phone]').val(),
                amount       : '1000.00',
                purpose      : 'Payment description/purpose',
                redirect_url : 'https://your.domain.name/success.html',
            },
            checkout_type: 'custom',
            checkout_custom: function( data ){
              var checkout_url = data.payment_request.longurl;
               alert('Here is the URL link: '+ checkout_url);
         });
    });
});
</script>




History: How It All Started?

Formerly known as mojoCheckout(js) in 2016, now mojoReq(js) in 2023, a different namespace, still has the same awesome functionalities.  ... Read more »


Plugin Options, Defaults & Usages

Below are the available options & default values used at mojoReq(js) . Set, change, update these options values anytime in your webpa... Read more »


Checkout Type — Custom

Allows to create a custom checkout environment using JSON data objects retrieved from Instamojo. Works well when you require total control ... Read more »


Checkout Type — Floating

Floating checkout with Instamojo allows to create/accept payment right on your blog or webpage, no page refresh, no page redirects. Insta... Read more »


Checkout Type — Light

Use light checkout with Instamojo by passing payer name, email & phone in form directly to Instamojo final payment page. With Light C... Read more »