polar subscriptions <subcommand> [flags]
polar subscriptions getGet a subscription by ID.polar subscriptions listList subscriptions.polar subscriptions revokeRevoke a subscription, i.e cancel immediately.polar subscriptions updateUpdate a subscription.
polar subscriptions get
Get a subscription by ID.polar subscriptions get [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
polar subscriptions list
List subscriptions.polar subscriptions list [flags]
| Flag | Type | Description |
|---|---|---|
--data, -d | string | JSON object; explicitly supplied flags override its top-level keys |
--organization-id, --org | string | Filter by organization ID. Defaults to the active organization. |
--product-id | string | Filter by product ID. |
--customer-id | string | Filter by customer ID. |
--external-customer-id | string | Filter by customer external ID. |
--discount-id | string | Filter by discount ID. |
--active | boolean | Filter by active or inactive subscription. |
--status | choice | Filter by subscription status. (choices: incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, paused) |
--cancel-at-period-end | boolean | Filter by subscriptions that are set to cancel at period end. |
--customer-cancellation-reason | choice | Filter by customer cancellation reason. (choices: customer_service, low_quality, missing_features, switched_service, too_complex, too_expensive, unused, other) |
--canceled-at-after | string | Filter by cancellation date (after or equal to). |
--canceled-at-before | string | Filter by cancellation date (before or equal to). |
--started-after | string | Only include subscriptions started after this date. |
--started-before | string | Only include subscriptions started before this date. |
--page | integer | Page number, defaults to 1. |
--limit | integer | Size of a page, defaults to 10. Maximum is 100. |
--sorting | choice | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order. (choices: customer, -customer, status, -status, started_at, -started_at, current_period_end, -current_period_end, ended_at, -ended_at, ends_at, -ends_at, amount, -amount, product, -product, discount, -discount) |
--metadata | string | Filter by metadata key-value pairs. JSON: {“<key>”: string | integer | boolean | array of string | array of integer | array of boolean} |
polar subscriptions revoke
Revoke a subscription, i.e cancel immediately.polar subscriptions revoke [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
| Flag | Type | Description |
|---|---|---|
--confirm, -c | boolean | Skip the confirmation prompt for destructive requests |
polar subscriptions update
Update a subscription.polar subscriptions update [flags] <id>
| Argument | Type | Description |
|---|---|---|
id | string |
| Flag | Type | Description |
|---|---|---|
--confirm, -c | boolean | Skip the confirmation prompt for destructive requests |
--data, -d | string | JSON object; explicitly supplied flags override its top-level keys |
--metadata | string | Key-value object allowing you to store additional information. JSON: {“<key>”: string | integer | number | boolean} |
--product-id | string | Update subscription to another product. |
--proration-behavior | choice | Determine how to handle the proration billing. If not provided, will use the default organization setting. (choices: invoice, prorate, next_period, reset) |
--discount-id | string | Update the subscription to apply a new discount. If set to null, the discount will be removed. The change will be applied on the next billing cycle. |
--trial-end | string | Set or extend the trial period of the subscription. If set to now, the trial will end immediately and the first billing cycle will be charged synchronously. The subscription remains trialing if the payment fails. |
--seats | integer | Update the number of seats for this subscription. |
--units | integer | Update the number of units for this subscription. |
--current-billing-period-end | string | Set a new date for the end of the current billing period. The subscription will renew on this date. The new date can be earlier or later than the current period end, as long as it’s in the future. |
--customer-cancellation-reason | choice | Customer reason for cancellation. (choices: customer_service, low_quality, missing_features, switched_service, too_complex, too_expensive, unused, other) |
--customer-cancellation-comment | string | Customer feedback and why they decided to cancel. |
--cancel-at-period-end | boolean | Cancel an active subscription once the current period ends. |
--revoke | string | Cancel and revoke an active subscription immediately JSON: true |
--pause-at-period-end | boolean | Pause an active subscription at the end of the current period. |
--resumes-at | string | Date at which the paused subscription should automatically resume. |
--resume | string | Resume a paused subscription immediately, starting a new billing period and charging the customer. JSON: true |
--pending-update | string | Clear the pending subscription update. Set to null to remove scheduled changes. JSON: null |

