Validate products.json structure against Stripe billing patterns. Use to check template billing configuration before implementation.
Validates products.json files in templates against Stripe billing best practices and required schema.
Use this skill when:
python3 .claude/scripts/stripe/validate_products.py --file "templates/TEMPLATE_NAME/stripe/products.json"
python3 .claude/scripts/stripe/validate_products.py --all
python3 .claude/scripts/stripe/validate_products.py --file "path/to/products.json" --verbose
| Parameter | Required | Description |
|---|---|---|
--file | Yes* | Path to products.json file to validate |
--all | No | Validate all templates in templates/ folder |
--verbose | No | Show detailed validation output |
*Required unless using --all
| Field | Description |
|---|---|
billingModel or products[].type | Must specify billing model type |
products | Array of product definitions |
products[].id | Unique product identifier |
products[].name | Display name |
products[].features | Feature list array |
| Model | Required Fields |
|---|---|
usage-based | metering.metric, metering.unit |
seat-based | seatManagement.prorationBehavior |
feature-limits | products[].limits object |
contact_sales: truetrialDays specifiedpython3 .claude/scripts/stripe/validate_products.py \
--file "templates/analytics-dashboard/stripe/products.json"
python3 .claude/scripts/stripe/validate_products.py --all --verbose
{
"success": true,
"file": "templates/analytics-dashboard/stripe/products.json",
"billingModel": "usage-based",
"validation": {
"errors": [],
"warnings": ["Annual discount of 40% is higher than typical 28%"],
"passed": ["Required fields present", "Price format valid", "Metering config valid"]
},
"products": 3,
"summary": "Validation passed with 1 warning"
}
Run after any products.json modification:
# After editing
python3 .claude/scripts/stripe/validate_products.py \
--file "templates/analytics-dashboard/stripe/products.json"
# Before committing changes
python3 .claude/scripts/stripe/validate_products.py --all
stripe-billing-docs - Lookup billing patternsstripe-webhook-checker - Validate webhook handlerstemplate-validator - Full template validation