Plan basics - price, renew schedule, free trial period, etc.
Current plan model and lifecycle in the v1 API.
What a plan contains
namecurrencyintervalandinterval_counttrial_period_days- default fixed item price (
unit_amount, in cents) - attached features through
plan-features
Plan lifecycle
POST /v1/planscreates the plan in draft flow.- Add features with
POST /v1/plan-features. POST /v1/plans/{id}/publishmakes it subscribable.
Checkout sessions and payment links require the plan to be published.
Create a plan
curl -sS -X POST "$PORTCALL_API_BASE/v1/plans" \
-H "x-api-key: $PORTCALL_API_KEY" \
-H "content-type: application/json" \
-d '{"name":"Pro","currency":"USD","interval":"month","interval_count":1,"trial_period_days":14,"unit_amount":9900}'