Skip to main content
When a user buys a regular plan (like “Pro”), the receipt metadata contains a planId. Use this to look up which features are included.

Step 1: Get the plan ID from the receipt

const receipt = await fetch(
  `https://cuprice.io/api/stripe/receipt?session_id=${sessionId}&shareId=${shareId}`
);
const { metadata } = await receipt.json();
const planId = metadata.planId; // e.g. "101"

Step 2: Look up plan features

const share = await fetch(`https://cuprice.io/api/share/${shareId}`);
const { plans } = await share.json();
const plan = plans.find(p => p.id.toString() === planId);

Step 3: Get the feature list

const features = plan.features
  .filter(f => f.included)
  .map(f => f.name);
// => ["AI Prompt", "Dashboard", "Projects"]
The included field tells you whether the feature is active in that plan. Features with limit values have numeric caps (e.g. “100 API calls”).