Who owns what, in one call
// Does this customer own the course?
const api = "https://api.sherpo.io/customer/v1";
const res = await fetch(
`${api}/stores/demo.sherpo.io/entitlements`,
{ headers: { Authorization: `Bearer ${token}` } }
);
const { items } = await res.json();
const owns = items.some(
(e) => e.product_id === courseId && e.held
);Sherpo answers for every product, tier and subscription. Your site just shows the lesson.