Skip to main content

Subscription Widget

The Subscription Widget related methods which return information from the CDN related to your product catalog and the subscription widget.

All requests to the Product CDN are cached. The caller must call the resetCDNCache function to clear it and fetch updated data.

getCDNStoreSettings v1.0.0 Types

Returns the store settings for your store.

import { getCDNStoreSettings } from '@rechargeapps/storefront-client';
await getCDNStoreSettings();

getCDNWidgetSettings v1.0.0 Types

Returns the widget settings for your store.

import { getCDNWidgetSettings } from '@rechargeapps/storefront-client';
await getCDNWidgetSettings();

getCDNProductAndSettings v1.0.0 Types

Returns a product by external product id with the widget and store settings.

import { getCDNProductAndSettings } from '@rechargeapps/storefront-client';
await getCDNProductAndSettings(externalProductId);

getCDNProductsAndSettings v1.0.0 Types

Returns all products, store settings, and widget settings for your store.

This call allows you to get all your products and settings together. However if there are too many products and the payload is too large this will return with an error of too many products requiring you to fetch products one at a time.

import { getCDNProductsAndSettings } from '@rechargeapps/storefront-client';
await getCDNProductsAndSettings();