Customer login flow
PriceOps library and code to ensure the customer is logged into your app before subscribing
npm i priceops
// import priceops function from priceops library
import priceops from 'priceops';
// You can include this line in your UI code anywhere after the customer data
// available
// Customer id is the unique customer id in your app
// Customer email is the email your customers use to access your app
priceops.setCustomer(customer.id, customer.email);
// On logout call the below function to remove the customer information from
// priceops library
priceops.onCustomerLogout();
Last updated