> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cuprice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Regular Plans

> Gate features for users who bought a pre-built plan

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

```typescript theme={null}
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

```typescript theme={null}
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

```typescript theme={null}
const features = plan.features
  .filter(f => f.included)
  .map(f => f.name);
// => ["AI Prompt", "Dashboard", "Projects"]
```

<Info>
  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").
</Info>
