deposits
Search…
E-Commerce
The Deposits e-commerce SDK is an easy to embed headless commerce system for enabling e-commerce anywhere, allowing creators to setup and operate an online store easily. With our SDK, you can allow your users to manage their products, orders, payment, shipping, and more.

Use Cases

Some of features that are provided by our SDK, includes
  • Online store creation,
  • Customer management,
  • Inventory management,
  • Payments management.
  • One-click-check

Getting Started

To get started with this SDK, follow the steps to get it up and running locally for development and testing.

Requirements

It’s important to note that this SDK supports development for Android and iOS apps only.
  • Android
    To ensure a successful integration, be sure to meet the following criteria:
    1. 1.
      Use Android 5.0 (API level 21) and later.
    2. 2.
      When updates are made, rebuild the app rather than update with hot reload.
    If you have any problems integrating this package into your Android app, please reach out to us for support.
  • iOS
    This SDK is compatible with apps that run on iOS 10 and later.

How to Use

There are two major steps involved in using this SDK;
  • Import the SDK,
  • Set up environment variables,
  • Embed the SDK widget.

Importing the SDK

You can import the SDK using the pubspec.yaml file in your root directory (recommended) or using the terminal.
  1. 1.
    To import the SDK, embed the following code into your pubspec.yaml file.
    dependencies:
    deposits_ecommerce: ^0.0.1
  2. 2.
    Using the terminal, you can run the following command:
    flutter pub add deposits_ecommerce

Setting up environment variables

It’s important to set up and secure your environment variables in a .env file at the root of your project directory. Log in to the deposits console in staging or production to retrieve your API key, and define them as seen below. You will gain access to the SDK by using these keys.
API_KEY="your-api-key"
API_KEY_TEST="your-test-api-key"

Initiating the SDK

After importing the SDK and configuring your .env variables, you can use the widget in your app to initiate the intended flow. Our SDK has two main flows: the Customer and Merchant flows.
Customer Flow
To begin the customer flow in your flutter application, use the widget below.
depositsCustomerWidget(
context,
merchantId: '1',
customerID: '1',
envMode: envMode,
apiKey: apiKey ,
)
Merchant Flow
To begin the customer flow in your flutter application, use the widget below.
depositsMerchantWidget(
context,
ButtonConfig(buttonText: 'buttonText'),
merchantID: '',
apiKey: apiKey,
envMode: envMode,
)

Functions

The SDK includes functions for managing both customer and merchant operations. As a result, in order to effectively use or manipulate the SDK, you can call our e-commerce API in your application.

Example

We've set up a wonderful example in this repo to explain how to create your application and integrate our SDK for the different flows.

References

Support

Have trouble integrating? For assistance, please contact [email protected].

Contributing

Only members of the deposits team can contribute to this. However, you can create an issue if you find a bug or have any challenges using this SDK.
Copy link
On this page
Use Cases
Getting Started
How to Use
Functions
Example
References
Support
Contributing