Integrate Real Commerce into your App

Easily connect your agents and customers to the value chain of leading FMCG suppliers in your territory. You'll find comprehensive guides and documentation to help you start working with the ShopTopUp CommerceAPI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Registering a ShopTopUp Buyer

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="register-btn">Register</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("register-btn").addEventListener("click", function(){
  shopCheckout.register({
  // predefined user attributes
    agentId: 'fhj50tgoonoo',
    firstName: 'chisom',
    lastName: 'onwuegbuzie',
    phoneNumber: '+2348066379681',
    countryCode: 'NG',
    company: 'Goldtek Ventures',
    latitude: 3.134555,
    longitude: 3.058585,
    address: '259 etim inyang crescent'
    });
  }, false);

Open Cart

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="open-cart-btn">Open Cart</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("open-cart-btn").addEventListener("click", function(){
    shopCheckout.openCart();
}, false);

Open Transaction

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="open-transaction-btn">Open Transaction</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("open-transaction-btn").addEventListener("click", function(){
        shopCheckout.openTransaction();
      }, false);
    },

Sample App

Please find the sample app in the below link

Updated 8 days ago


Usage


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.