Deposits Commerce SDK

pub package

The Deposits commerce SDK is an easy to embed commerce system for allowing creators to setup and operate an online store without owning an e-commerce website. Empowering vendors to launch commerce feature without the engineering time at less the cost of building commerce capabilities internally. Shoppers can view products and checkout one item at a time from each vendor's store without leaving the application .

deposits-one-click-checkout-flutter_cover

Installation

pubspec.yaml :

dependencies:

flutter:

sdk: flutter

deposits_ecommerce: <Latest version>

Terminal :

flutter pub add deposits_one_click_checkout

Features

  • Create Store.
  • Customer Management
  • Cart Management.
  • Order Management.
  • Products management.
  • Categories.
  • Shipping Address Management.
  • Merchant management.
  • Etc and more.

Requirements

Android

This plugin requires several changes to be able to work on Android devices. Please make sure you follow all these steps:

  1. Use Android 5.0 (API level 21) and above

  2. Rebuild the app, as the above changes don't update with hot reload

iOS

Compatible with apps targeting iOS 10 or above.

Web

We do not support the web via this plugin for now

Usage

The library provides a UI component for creating and managing stores and managing customers.

Customer Management/Flow Example

    depositsCustomerWidget(
      context,
      merchantId: '1',
      customerID: '1',
      envMode: envMode,
      apiKey: apiKey ,
    )

Merchant Management/Flow Example

    depositsMerchantWidget(
      context,
      ButtonConfig(buttonText: 'buttonText'),
      merchantID: '',
      apiKey: apiKey,
      envMode: envMode,
     )

Parameter, buttonText is the name you want on the button

Parameter merchantID is the id of the merchant(whom you want to display their products) provided by Deposits API when the merchant was created, e.g. 43cba34n65l.

Parameter customerID is the id of the customer which is the user about to buy/purchase something provided by the Deposits API when the customer was created, e.g. 98iei74uij.

Parameter apiKey is the key for the merchant provided byt Deposits API when the merchant was created, e.g. deposits-ecommerce-test.

Parameter `envMode`, tells the library if it should use the staging or the live environment. /// Useful if you are debuging or in development.

The goal of Deposits Commerce SDK is to make building amazing Ecommerce apps with flutter and Deposits as easy as can be and help improve your workflow.

Deposit Commerce SDK initialization

To initialize Deposit Ecommerce Customer Management/Flow in your Flutter app, use the depositsCustomerWidget and depositsMerchantWidget for Deposits Ecommerce Merchant Management/Flow

depositsCustomerWidget and depositsMerchantWidget offers context, buttonConfig, initialScreen, envMode, merchantID and customerID, apiKey. Only apiKey, envMode and buttonConfig (which has the following params : amount required, textStyle, height, minwidth , etc as customizable widgets ) is required. envMode is either true or false as a bool.

Dart API

deposits

The library offers several methods to handle both customer and merchant related actions:

import 'package:deposits_ecommerce/deposits_ecommerce.dart';

DepositsApi depositsApi = DepositsApi(
    apiKey: 'deposits-ecommerce-test', 
    isProduction: false, 
    isDebug: true
);

===================Merchant External API's===================
print("======>>>>>>");
var categoryApiResponse = await depositsApi.getCategories();
print("categoryApiResponse $categoryApiResponse");

print("======>>>>>>");
var setUpShopApiResponse = await depositsApi.setupMerchant('233', 'demo shop', 'my demo shop', 'support@example.com', 'Electronics', '500443', 'Mina avenue', 'Dallas', 'Texas', 'USA');
print("setUpShopApiResponse $setUpShopApiResponse");

print("======>>>>>>");
var getMerchantApiResponse = await depositsApi.getMerchant('22');
print("getMerchantApiResponse $getMerchantApiResponse");

print("======>>>>>>");
var getMerchantInfoApiResponse = await depositsApi.getMerchantInfo('22');
print("getMerchantInfoApiResponse $getMerchantInfoApiResponse");

print("======>>>>>>");
var getSelectedMerchantsApiResponse = await depositsApi.getSelectedMerchants(['22']);
print("getSelectedMerchantsApiResponse $getSelectedMerchantsApiResponse");

print("======>>>>>>");
var updateMerchantApiResponse = await depositsApi.updateMerchant('22', 'demo shop', 'my demo shop', 'support@example.com', 'Electronics', '500443', 'Mina avenue', 'Dallas', 'Texas', 'USA');
print("updateMerchantApiResponse $updateMerchantApiResponse");

print("======>>>>>>");
var updateMerchantContactInfoApiResponse = await depositsApi.updateMerchantContactInfo('22', 'mysupport@example.com', '74 clinoda avenue, dave town');
print("updateMerchantContactInfoApiResponse $updateMerchantContactInfoApiResponse");

print("======>>>>>>");
var updateMerchantPolicyApiResponse = await depositsApi.updateMerchantPolicy('22', 'we allow return but only if item is not defected', 'when we ship an order can not be cancelled and we deliver straight to your door step');
print("updateMerchantPolicyApiResponse $updateMerchantPolicyApiResponse");

print("======>>>>>>");
var updateMerchantShippingAndTaxInfoApiResponse = await depositsApi.updateMerchantShippingAndTaxInfo('22', '893883HHHJH', '20%', '30');
print("updateMerchantShippingAndTaxInfoApiResponse $updateMerchantShippingAndTaxInfoApiResponse");

print("======>>>>>>");
var createAssetApiResponse = await depositsApi.createAsset('22', 'file/csdvhrufre.png', 'my product', 'front image for my product');
print("createAssetApiResponse $createAssetApiResponse");

print("======>>>>>>");
var createProductApiResponse = await depositsApi.createProduct('22', 'HGDYU7374743', 'my product', '34', 'my book to help you sell', '3', 'true', '', '3', '10', {}, {});
print("createProductApiResponse $createProductApiResponse");


===================Customer External API's===================
print("======>>>>>>");
var createCustomerApiResponse = await depositsApi.createCustomer('22','calmpress@gmail.com','james','Bova','null','null',{'address':'null'});
print("createCustomerApiResponse $createCustomerApiResponse");

print("======>>>>>>");
var findCustomerApiResponse = await depositsApi.findCustomer('22','calmpress@gmail.com');
print("findCustomerApiResponse $findCustomerApiResponse");

print("======>>>>>>");
var getProductsApiResponse = await depositsApi.getProducts('22');
print("getProductsApiResponse $getProductsApiResponse");

print("======>>>>>>");
var getProductApiResponse = await depositsApi.getProduct('22', '2');
print("getProductApiResponse $getProductApiResponse");

print("======>>>>>>");
var getFeaturedProductsApiResponse = await depositsApi.getFeaturedProducts('22');
print("getFeaturedProductsApiResponse $getFeaturedProductsApiResponse");

The example app offers examples on how to use these methods.

Run the example app

  • Navigate to the example folder cd example

  • Install the dependencies

  • flutter pub get

  • Set up env vars for the flutter app and a local backend.

  • Get your test API keys

  • Get your live API keys

  • Start the example

  • Terminal 1: flutter run

Contributing

Only members of the deposits team can contribute to this. You can create an issue if you find a bug or have any challenge using this SDK.

Libraries

add_delivery_address
add_delivery_address_controller
add_product
add_product_controller
add_tax_fees
add_tax_fees_controller
all_customers
all_customers_controller
all_customers_response
all_merchants
all_merchants
all_merchants_controller
all_orders_response
all_payments
all_payments_controller
all_products_response
all_shipping_address_response
app_colors
app_images
app_spacing
app_text_style
aseet_response
asset
button_config
city_model
constants
contact_address
contact_address_controller
country_model
create_customer
create_customer_controller
create_response
custom_appbar_widget
custom_back_button
custom_checkbox_widget
custom_close_button
custom_country_state_picker
custom_dropdown
custom_elevated_button
custom_horizontal_line
custom_image
custom_image_card
custom_image_loader
custom_inkwell_widget
custom_internet_retry
custom_listtile_checkbox_widget
custom_listtile_widget
custom_product_tag
custom_rich_text_widget
custom_row_text_widget
custom_safearea
custom_text
custom_text_button
custom_text_field_widget
custom_text_tag
customer
dashboard
dashboard_binding
dashboard_controller
data_source
delete_account
delete_account_controller
delete_response
delivery_address
delivery_address_controller
deposits_ecommerce
deposits_ecommerce
deposits_ecommerce_controller
dimens
dio_client
edit_address
edit_address_controller
edit_contact_address
edit_contact_address_controller
edit_product
edit_product_controller
edit_shipping_policy
edit_shipping_policy_controller
edit_shop_detail
edit_shop_detail_controller
edit_tax_fees
edit_tax_fees_controller
email_data
epayments
epayments_controller
exports
extensions
find_customer_response
get_all_assets_response
get_customer_response
get_merchant_email_response
get_products_response
home_menu
home_menu_controller
logging
merchant
merchant_response
meta
order
order_checkout_response
payment_details
payment_details_controller
payments_source
pivot
place_service
places_response
product
product_categories
product_details
product_details_controller
product_element
product_response
products
products_controller
setup_merchant_response
setup_shop
setup_shop_controller
shipping_address
shipping_address_response
shipping_policy
shipping_policy_controller
shop_button
shop_detail
shop_detail_controller
shop_item_detail
shop_item_detail_controller
shop_settings
shop_settings_controller
shops
shops_controller
single_product_response
state_model
status_model
storage
strings
successful_mgs
successful_mgs_controller
support
support_controller
support_response
tax_fee
tax_fee_controller
theme
uppercase_formatter
utils
validation
view_shop_item_detail
view_shop_item_detail_controller
view_shops
view_shops_controller
webhook