@subhubapps/store-sdk
v0.2.51
Published
Refilliate's Typescript/Javascript SDK for Stores
Downloads
101
Readme
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
- 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`)
- 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