⚓️ Portcall

How to define reset logic for metered features

Reset intervals are controlled by the plan-feature interval.

Set reset behavior through the interval field when attaching a feature to a plan.

Common intervals

  • hour
  • day
  • week
  • month
  • year
  • per_use
  • none or no_reset

Example

curl -sS -X POST "$PORTCALL_API_BASE/v1/plan-features" \
  -H "x-api-key: $PORTCALL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"plan_id":"plan_x","feature_id":"credits","quota":5000,"interval":"month"}'

After subscription, inspect the entitlement next_reset_at to validate runtime reset timing.