Called when a user builds a custom plan by selecting individual features.
Endpoint
POST /api/stripe/checkout/custom
Body
Array of feature names the user selected
"monthly", "3months", "6months", "9months", or "12months"
Number of users (for per-user pricing)
Usage amounts per feature. Keys are feature names, values are quantities.
Example request
{
"shareId": "nTZ7axXQHU",
"selectedFeatures": ["AI Prompt", "Dashboard"],
"email": "user@example.com",
"subscriptionDuration": "monthly",
"userCount": 1,
"featureUsageAmounts": {
"API Calls": 500
}
}
Response
{
"url": "https://checkout.stripe.com/c/pay/cs_live_..."
}
The checkout session stores feature details in metadata for later retrieval via the Receipt API:
{
"customPlan": "true",
"projectId": "203",
"featureDetails_0": "[{\"name\":\"AI Prompt\",\"price\":10,...}]"
}