@subhubapps/store-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.2.51 • Public • Published

store-sdk

Refilliate's Typescript/Javascript SDK for Merchant Stores

Installation

Install the package

npm install @subhubapps/store-sdk
# OR
yarn add @subhubapps/store-sdk

Usage

Fetch Customer Information from Refilliate.

This flow can be used to display customer information on your website where you are unable to use the built-in widgets

  1. Instantiate the Customer Fetcher
import { CustomerInfo } from '@subhubapps/store-sdk'

// accountUuid can be obtained from your Refilliate Dashboard -> Settings -> Store
// or it is available in Shopify Liquid through `shop.metafields.refilliate.account_uuid`

const customerInfoFetcher = new CustomerInfo.Fetcher(`accountUuid`)
  1. Get Customer's Info
// uuid - can be obtained in Shopify Liquid as `customer.metafields.refilliate.refilliate_uuid
// rechargeCustomerHash - Unique customer hash for Recharge Customer

const customerInfo = await customerInfoFetcher.get({ uuid: customerUuid })

Documentation

Check out the Documentation

Readme

Keywords

none

Package Sidebar

Install

npm i @subhubapps/store-sdk

Weekly Downloads

423

Version

0.2.51

License

UNLICENSED

Unpacked Size

97.9 kB

Total Files

30

Last publish

Collaborators

  • tusharsubhubapps
  • tusharranka