User
Properties
Property | Type | Description |
---|---|---|
email | string | Email address of the user. |
paid | boolean | True if the user has at least one active plan or a lifetime plan. |
plans | UserPlan[] | Array of plans the user has purchased. |
credits_left | number | Remaining credits for the user. |
Example
Plan
Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier for the plan. |
name | string | Name of the plan. |
price | number | Price in cents (e.g., 1000 for $10.00). |
credits | number | null | Number of credits included in the plan, null if not applicable. |
description | string | null | Description of the plan, null if not applicable. |
billing_cycle | string | Billing cycle, one of once , monthly , or yearly . |
Examples
UserPlan
Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier for the plan. |
name | string | Name of the plan. |
price | number | Price in cents (e.g., 1000 for $10.00). |
credits | number | null | Number of credits included in the plan, null if not applicable. |
description | string | null | Description of the plan, null if not applicable. |
billing_cycle | string | Billing cycle, one of once , monthly , or yearly . |
status | string | One of active , past_due or canceled |
paid_at | string | null | The date when the plan was paid/resubscribed. |
canceled_at | string | null | The date when the plan was canceled. |
Examples
UseCreditsResult
Properties
Property | Type | Description |
---|---|---|
success | boolean | true if credits were consumed |
credits_left | number | Remaining credits for user |