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    

Import the Module

Import agent checkout into your app

import co.tradedepot.shop.sdk.checkout.Checkout;
import co.tradedepot.shop.sdk.checkout.Registration;
import shopAgent from 'react-native-agent-checkout';

Register a ShopTopUp Buyer

This is to register an agent

Registration registration = Registration.Builder.create()
               .agentId("MyAgentId")
               .firstName("My First Name")
               .lastName("My Last Name")
               .phoneNumber("08099447050")
               .countryCode("NG")
               .company("Chibuzor Enterprises")
               .address("plot 259, etim iyang crescent, Victoria Island Lagos").build();
               Checkout.registerAgent(registration);
shopAgent.registerAgent({
  // Pre-defined 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'
});

Open Cart

This is to open a view which will allow you to place orders

checkout.openCart();
shopAgent.openCart();

Open Transaction

This is to view all orders made by the agent for the user

checkout.openTransactions()
shopAgent.openTransaction();

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.