@commet/node 9.10.0 → 9.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +123 -48
- package/dist/index.d.ts +123 -48
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -11
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/customers.md +3 -3
- package/docs/api-reference/index.md +1 -1
- package/docs/api-reference/invoices.md +4 -3
- package/docs/api-reference/plans.md +8 -4
- package/docs/api-reference/subscriptions.md +5 -4
- package/docs/api-reference/transactions.md +2 -1
- package/docs/documentation/invoicing/manage-invoices.md +1 -1
- package/docs/documentation/plans/add-ons.md +2 -2
- package/docs/documentation/plans/balance-and-top-ups.md +1 -1
- package/docs/documentation/plans/consumption-models.md +20 -0
- package/docs/documentation/plans/credit-packs.md +4 -2
- package/docs/documentation/plans/plan-versions.md +9 -7
- package/docs/documentation/sales/regional-prices.md +1 -1
- package/docs/documentation/subscriptions/manage-subscriptions.md +1 -1
- package/docs/errors/currency_held_by_balance_plan.md +22 -0
- package/docs/errors/currency_held_by_customer_credit.md +22 -0
- package/docs/errors/currency_held_by_fixed_amount_discount.md +22 -0
- package/docs/errors/currency_held_by_payment_method.md +22 -0
- package/docs/errors/currency_held_by_prepaid_period.md +22 -0
- package/docs/errors/currency_held_by_scheduled_pause.md +22 -0
- package/docs/errors/index.md +7 -1
- package/docs/errors/missing_regional_price.md +3 -3
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +1 -1
- package/docs/manifest.json +37 -1
- package/docs/schemas.md +22 -14
- package/docs/webhooks.md +4 -3
- package/package.json +1 -1
|
@@ -194,7 +194,7 @@ Update a customer's name, external ID, or metadata.
|
|
|
194
194
|
- `email` (`string`, optional)
|
|
195
195
|
- `fullName` (`string`, optional)
|
|
196
196
|
- `taxDocument` (`string`, optional)
|
|
197
|
-
- `businessTaxId` (`string | null`, optional) — Business tax ID, such as an EU VAT number
|
|
197
|
+
- `businessTaxId` (`string | null`, optional) — Business tax ID, such as an EU VAT number, a Peruvian RUC or an Argentine CUIT, for the country of the customer's address; its type comes from that country. Where Commet collects tax and that ID exempts business buyers, a valid ID replaces consumer tax with the business treatment; elsewhere it is stored as sent and does not change any charge. Send null to remove it.
|
|
198
198
|
- `externalId` (`string`, optional)
|
|
199
199
|
- `timezone` (`Timezone`, optional)
|
|
200
200
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
@@ -218,7 +218,7 @@ Create up to 100 customers in a single request. With planGroupId, each customer
|
|
|
218
218
|
|
|
219
219
|
### Parameters
|
|
220
220
|
|
|
221
|
-
- `customers` (`Array<{ email: string; id?: string; externalId?: string; fullName?: string; taxDocument?: string; timezone?: Timezone; metadata?: Record<string, unknown>; address?: { line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string } }>`, required)
|
|
221
|
+
- `customers` (`Array<{ email: string; id?: string; externalId?: string; fullName?: string; taxDocument?: string; businessTaxId?: string; timezone?: Timezone; metadata?: Record<string, unknown>; address?: { line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string } }>`, required)
|
|
222
222
|
- `planGroupId` (`string`, optional) — Plan group whose starting plan the customer starts on when it has no open subscription: its signup trial, a trial without a payment method, when the group has one and the customer never had that plan, otherwise its default plan. A customer who already had the signup trial plan in a group without a default plan starts on none. Without it, no plan is assigned.
|
|
223
223
|
|
|
224
224
|
### Request options
|
|
@@ -261,7 +261,7 @@ Create a new customer. Idempotent when customerId is provided. With planGroupId,
|
|
|
261
261
|
- `externalId` (`string`, optional)
|
|
262
262
|
- `fullName` (`string`, optional)
|
|
263
263
|
- `taxDocument` (`string`, optional)
|
|
264
|
-
- `businessTaxId` (`string`, optional) — Business tax ID, such as an EU VAT number
|
|
264
|
+
- `businessTaxId` (`string`, optional) — Business tax ID, such as an EU VAT number, a Peruvian RUC or an Argentine CUIT, for the country of the customer's address; its type comes from that country. Where Commet collects tax and that ID exempts business buyers, a valid ID replaces consumer tax with the business treatment; elsewhere it is stored as sent and does not change any charge.
|
|
265
265
|
- `address` (`{ line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string }`, optional)
|
|
266
266
|
- `addressId` (`string`, optional)
|
|
267
267
|
- `email` (`string`, required)
|
|
@@ -5,7 +5,7 @@ Generated from Commet API version `2026-08-27`.
|
|
|
5
5
|
Use this reference for the exact resources, methods, parameters, and return types available in the installed SDK.
|
|
6
6
|
|
|
7
7
|
- [Schemas](../schemas.md) — generated models and enums
|
|
8
|
-
- [API errors](../errors/index.md) —
|
|
8
|
+
- [API errors](../errors/index.md) — 100 version-matched error references
|
|
9
9
|
- [Addons](./addons.md) — 6 operations
|
|
10
10
|
- [Api Keys](./api-keys.md) — 3 operations
|
|
11
11
|
- [Provisioning](./provisioning.md) — 1 operations
|
|
@@ -64,12 +64,13 @@ Send the invoice to the customer via email.
|
|
|
64
64
|
|
|
65
65
|
`PATCH /invoices/{id}/status` · operation `update-invoice-status`
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Deprecated. No longer changes the invoice. An invoice is paid when its charge settles: to collect a past-due subscription, reactivate it or send the customer a recovery link.
|
|
68
|
+
|
|
69
|
+
Deprecated.
|
|
68
70
|
|
|
69
71
|
### Parameters
|
|
70
72
|
|
|
71
73
|
- `id` (`string`, required)
|
|
72
|
-
- `status` (`"paid" | "void"`, required)
|
|
73
74
|
|
|
74
75
|
### Request options
|
|
75
76
|
|
|
@@ -77,7 +78,7 @@ Mark an outstanding invoice as "paid" or "void" and return the updated invoice.
|
|
|
77
78
|
|
|
78
79
|
### Returns
|
|
79
80
|
|
|
80
|
-
`
|
|
81
|
+
`void`
|
|
81
82
|
|
|
82
83
|
## list
|
|
83
84
|
|
|
@@ -16,7 +16,7 @@ Publish a draft as the plan's current version, as a new experiment with its own
|
|
|
16
16
|
- `draftId` (`string`, required)
|
|
17
17
|
- `publishAs` (`"current" | "experiment" | "experiment_version"`, required) — current sells the draft to every new buyer.
|
|
18
18
|
- `move` (`"keep" | "period_end" | "now"`, optional) — What happens to subscribers of earlier versions: keep them, move them at their next renewal, or move them now (features and balance change today, the price at renewal). Nobody moves unless every one of them fits or has a change below.
|
|
19
|
-
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string
|
|
19
|
+
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string>; currency?: string }>`, optional) — Per-subscriber changes that make each one fit, applied at its renewal.
|
|
20
20
|
- `preview` (`boolean`, optional) — Check everything without publishing.
|
|
21
21
|
- `experimentCode` (`string`, optional) — The experiment's own code, after the plan's code.
|
|
22
22
|
|
|
@@ -65,7 +65,7 @@ Change a draft's prices per interval, trials, the interval shown first, countrie
|
|
|
65
65
|
- `draftId` (`string`, required)
|
|
66
66
|
- `prices` (`Array<{ billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"; price: number; includedCredits?: number | null; includedBalance?: number | null; trialDays?: number | null; trialRequiresPaymentMethod?: boolean; isDefault?: boolean }>`, optional) — Every interval the draft sells. An interval the draft sold and this list leaves out is removed from the draft.
|
|
67
67
|
- `countries` (`Array<{ country: string; currency: string; exchangeRate?: number | null; prices: Array<{ billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"; price: number; includedBalance?: number } | { billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time"; followBase: true }>; topUpMinimum?: number | null; maxPlanBalance?: number | null; planBalanceLimit?: number | null; addonPrices?: Array<{ addonId: string; price: number } | { addonId: string; followBase: true }>; creditPackPrices?: Array<{ creditPackId: string; price: number } | { creditPackId: string; followBase: true }> }>`, optional) — Every country with its own currency or prices. A country the draft sold and this list leaves out is removed. A country missing a price blocks publishing.
|
|
68
|
-
- `rules` (`{ freeIncludedCredits?: number | null; freeIncludedBalance?: number | null; unusedPlanCredits?: "expire" | "roll_over"; maxPlanCredits?: number | null; planCreditLimit?: number | null; planCreditLimitInterval?: "day" | "week" | null; unusedPlanBalance?: "expire" | "roll_over"; maxPlanBalance?: number | null; planBalanceLimit?: number | null; planBalanceLimitInterval?: "day" | "week" | null; blockOnExhaustion?: boolean; purchasesEnabled?: boolean; creditPurchaseUnitPrice?: number | null; creditPurchaseMinimum?: number | null; topUpMinimum?: number | null }`, optional) — Credit or balance rules; fields left out stay as they are.
|
|
68
|
+
- `rules` (`{ freeIncludedCredits?: number | null; freeIncludedBalance?: number | null; unusedPlanCredits?: "expire" | "roll_over"; maxPlanCredits?: number | null; unlimitedPlanCredits?: boolean; planCreditLimit?: number | null; planCreditLimitInterval?: "day" | "week" | null; unusedPlanBalance?: "expire" | "roll_over"; maxPlanBalance?: number | null; unlimitedPlanBalance?: boolean; planBalanceLimit?: number | null; planBalanceLimitInterval?: "day" | "week" | null; blockOnExhaustion?: boolean; purchasesEnabled?: boolean; creditPurchaseUnitPrice?: number | null; creditPurchaseMinimum?: number | null; topUpMinimum?: number | null }`, optional) — Credit or balance rules; fields left out stay as they are.
|
|
69
69
|
- `undo` (`Array<string>`, optional) — Change keys to put back as the version the draft started from had them.
|
|
70
70
|
|
|
71
71
|
### Request options
|
|
@@ -143,7 +143,7 @@ Stop selling the experiment. Its code sells the plan's current version from then
|
|
|
143
143
|
- `id` (`string`, required)
|
|
144
144
|
- `code` (`string`, required)
|
|
145
145
|
- `subscribers` (`"keep" | "period_end" | "now"`, optional) — What happens to the experiment's subscribers: keep them on its versions, move them to the plan's current version at their next renewal, or move them now. Nobody moves, and the experiment keeps running, unless every one of them fits or has a change.
|
|
146
|
-
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string
|
|
146
|
+
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string>; currency?: string }>`, optional) — Per-subscriber changes that make each one fit, applied at its renewal.
|
|
147
147
|
- `preview` (`boolean`, optional) — Check the archive and the move without changing anything.
|
|
148
148
|
|
|
149
149
|
### Request options
|
|
@@ -419,7 +419,7 @@ Move a list of subscriptions, or every subscription of another version, to a new
|
|
|
419
419
|
- `subscriptionIds` (`Array<string>`, optional) — Public IDs of the subscriptions to move.
|
|
420
420
|
- `toVersionId` (`string`, required) — The version subscribers move to.
|
|
421
421
|
- `effective` (`"now" | "period_end"`, required) — now changes features and the included amount today and the price at renewal; period_end moves each subscriber at its next renewal.
|
|
422
|
-
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string
|
|
422
|
+
- `changes` (`Array<{ subscriptionId: string; keepOnVersion?: true; billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly"; seatLimit?: true; removeAddonIds?: Array<string>; currency?: string }>`, optional) — Per-subscriber changes that make each one fit, applied at its renewal.
|
|
423
423
|
- `preview` (`boolean`, optional) — Check every subscriber without moving anyone.
|
|
424
424
|
- `fromVersionId` (`string`, optional) — Move every active, trialing and past due subscription on this version of the plan.
|
|
425
425
|
|
|
@@ -670,8 +670,10 @@ Update a plan's name, description, visibility, default status, metadata, overage
|
|
|
670
670
|
- `metadata` (`Record<string, unknown>`, optional)
|
|
671
671
|
- `isPublic` (`boolean`, optional)
|
|
672
672
|
- `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null }`, optional) — Credits plans only. What happens to unused plan credits at each reset. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
673
|
+
- `unlimitedPlanCredits` (`boolean`, optional) — Credits plans only. true makes the plan credits unlimited: usage never spends them, only planCreditLimit caps it, and every price includes 0 credits. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
673
674
|
- `planCreditLimit` (`{ credits: number; interval: "day" | "week" } | null`, optional) — Credits plans only. The most plan credits a subscription spends per day or per week; null removes the limit. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
674
675
|
- `unusedPlanBalance` (`{ type: "expire" } | { type: "roll_over"; maxPlanBalance: number | null }`, optional) — Balance plans only. What happens to unused plan balance at each reset. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
676
|
+
- `unlimitedPlanBalance` (`boolean`, optional) — Balance plans only. true makes the plan balance unlimited: usage never spends it, only planBalanceLimit caps it, and every price and country includes no balance. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
675
677
|
- `planBalanceLimit` (`{ amount: number; interval: "day" | "week" } | null`, optional) — Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null removes the limit. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
676
678
|
- `blockOnExhaustion` (`boolean`, optional) — Credits and balance plans only. false lets usage continue past the plan and purchased amounts and bills the missing amount as overage at the next renewal; a credits plan bills it at the price per credit and needs one. Trials and free plans always stop, so free plans accept only true. Changing it publishes a new version of the plan; each subscription stays on its version until moved.
|
|
677
679
|
- `isDefault` (`boolean`, optional) — Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan in a plan group; replaces the group's previous default plan. false unmarks it.
|
|
@@ -832,8 +834,10 @@ Create a new plan with optional consumption model, visibility, plan group assign
|
|
|
832
834
|
- `isFree` (`boolean`, optional)
|
|
833
835
|
- `blockOnExhaustion` (`boolean`, optional) — Credits and balance plans. Omitted, credits plans and free plans stop usage when the plan and purchased amounts run out, and paid balance plans bill the missing balance as overage. A new credits plan always stops usage: it allows overage only with a price per credit, which is set after creation, and then `PATCH /v1/plans/{id}` turns overage on.
|
|
834
836
|
- `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null }`, optional) — Credits plans only. What happens to unused plan credits at each reset; omitted means they expire.
|
|
837
|
+
- `unlimitedPlanCredits` (`boolean`, optional) — Credits plans only. true makes the plan credits unlimited: usage never spends them, only planCreditLimit caps it, and every price includes 0 credits. Omitted means false.
|
|
835
838
|
- `planCreditLimit` (`{ credits: number; interval: "day" | "week" } | null`, optional) — Credits plans only. The most plan credits a subscription spends per day or per week; omitted or null means no limit.
|
|
836
839
|
- `unusedPlanBalance` (`{ type: "expire" } | { type: "roll_over"; maxPlanBalance: number | null }`, optional) — Balance plans only. What happens to unused plan balance at each reset; omitted means it expires.
|
|
840
|
+
- `unlimitedPlanBalance` (`boolean`, optional) — Balance plans only. true makes the plan balance unlimited: usage never spends it, only planBalanceLimit caps it, and every price and country includes no balance. Omitted means false.
|
|
837
841
|
- `planBalanceLimit` (`{ amount: number; interval: "day" | "week" } | null`, optional) — Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; omitted or null means no limit.
|
|
838
842
|
- `planGroupId` (`string`, optional)
|
|
839
843
|
- `isDefault` (`boolean`, optional) — Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan with a planGroupId; replaces the group's previous default plan.
|
|
@@ -25,7 +25,7 @@ Deactivate an add-on from a subscription.
|
|
|
25
25
|
|
|
26
26
|
`POST /subscriptions/{id}/addons` · operation `activate-addon`
|
|
27
27
|
|
|
28
|
-
Activate an add-on on a subscription.
|
|
28
|
+
Activate an add-on on a subscription. Creates the activation invoice and charges a prorated amount for the current billing period; the add-on is active once the payment is confirmed. Rejected with 409 while the add-on is active or an activation of it is still processing. An add-on that the subscription's plan version does not sell is rejected with addon_unavailable.
|
|
29
29
|
|
|
30
30
|
### Parameters
|
|
31
31
|
|
|
@@ -110,7 +110,7 @@ Adjust a subscription's balance or credits by a signed amount. Positive adds, ne
|
|
|
110
110
|
|
|
111
111
|
`POST /subscriptions/{id}/balance/topup` · operation `topup-balance`
|
|
112
112
|
|
|
113
|
-
Top up a balance subscription.
|
|
113
|
+
Top up a balance subscription. Creates the top-up invoice and charges the customer's payment method for the amount plus tax. Once the payment is confirmed, adds the amount to the subscription's purchased balance (after paying back any overage owed on the plan balance), marks the invoice paid and emits `balance.topped_up`. Purchased balance is spent after the plan balance and is kept until the subscription ends. Rejected with 400 when the subscription is not on a balance plan, its plan has top-ups turned off, or the amount is below the effective minimum: the plan's minimum top-up in the subscription currency, raised to the currency's minimum charge.
|
|
114
114
|
|
|
115
115
|
### Parameters
|
|
116
116
|
|
|
@@ -182,13 +182,14 @@ Upgrade or change billing interval immediately, optionally applying an Offer by
|
|
|
182
182
|
|
|
183
183
|
`POST /subscriptions/{id}/change-version` · operation `change-subscription-version`
|
|
184
184
|
|
|
185
|
-
Move a subscription to a newer published version of its plan, now or at the end of the period, without proration; an older version is rejected with version_not_newer, and a subscription on a running experiment moves only to a later version of that experiment. The subscription keeps its currency and its price: a destination that does not sell its currency is rejected with missing_regional_price, and one that does not sell the price it pays with price_not_found. A free version moves only to a free version and a paid one only to a paid one (validation_error). A subscription whose usage does not fit the destination, or with an active add-on the destination does not sell, is not moved either, and the error says why. Each change is recorded as a move of this one subscription in the plan's moves. Repeating the same request changes nothing; a new one replaces the pending move.
|
|
185
|
+
Move a subscription to a newer published version of its plan, now or at the end of the period, without proration; an older version is rejected with version_not_newer, and a subscription on a running experiment moves only to a later version of that experiment. The subscription keeps its currency and its price: a destination that does not sell its currency is rejected with missing_regional_price unless currency asks to charge it in USD from its renewal, and one that does not sell the price it pays with price_not_found. A free version moves only to a free version and a paid one only to a paid one (validation_error). A subscription whose usage does not fit the destination, or with an active add-on the destination does not sell, is not moved either, and the error says why. Each change is recorded as a move of this one subscription in the plan's moves. Repeating the same request changes nothing; a new one replaces the pending move.
|
|
186
186
|
|
|
187
187
|
### Parameters
|
|
188
188
|
|
|
189
189
|
- `id` (`string`, required)
|
|
190
190
|
- `planVersionId` (`string`, required) — A published version of the subscription's plan.
|
|
191
191
|
- `effective` (`"now" | "period_end"`, required) — now changes features, limits and the included credits or balance at once (the included difference is added to or subtracted from the plan credits or plan balance: an increase first pays any plan-part debt, a decrease never creates new debt, and purchased credits and purchased balance are untouched) and charges the new price from the next renewal. period_end changes everything at the next renewal. There is never a proration charge or refund.
|
|
192
|
+
- `currency` (`string`, optional) — usd to charge the subscription in USD from its next renewal when the version does not sell the currency it pays, or the USD price of its country: it pays the version's USD price for its country, or the USD base price. The whole move then happens at that renewal, even with effective now. Rejected with missing_regional_price when the version still sells what the subscription pays or for another currency, and with a currency_held_by code naming what keeps it in its currency: currency_held_by_payment_method (it pays through dLocal), currency_held_by_customer_credit, currency_held_by_balance_plan, currency_held_by_fixed_amount_discount, currency_held_by_prepaid_period or currency_held_by_scheduled_pause.
|
|
192
193
|
|
|
193
194
|
### Request options
|
|
194
195
|
|
|
@@ -204,7 +205,7 @@ Move a subscription to a newer published version of its plan, now or at the end
|
|
|
204
205
|
|
|
205
206
|
`POST /subscriptions/{id}/credits` · operation `purchase-credits`
|
|
206
207
|
|
|
207
|
-
Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum.
|
|
208
|
+
Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Creates the purchase invoice, charges the saved payment method and adds the purchased credits once the payment is confirmed. A credit pack that the subscription's plan version does not sell is rejected with credit_pack_unavailable.
|
|
208
209
|
|
|
209
210
|
### Parameters
|
|
210
211
|
|
|
@@ -8,11 +8,12 @@ API version: `2026-08-27`
|
|
|
8
8
|
|
|
9
9
|
`POST /transactions/{id}/refund` · operation `refund-transaction`
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Refund a positive amount in the payment currency’s smallest unit, or omit amount to refund the remaining amount. Returns the refund resource with its actual status.
|
|
12
12
|
|
|
13
13
|
### Parameters
|
|
14
14
|
|
|
15
15
|
- `id` (`string`, required)
|
|
16
|
+
- `amount` (`number`, optional) — Amount returned to the customer, including tax, in the payment currency’s smallest unit. Omit to refund the remainder.
|
|
16
17
|
|
|
17
18
|
### Request options
|
|
18
19
|
|
|
@@ -215,7 +215,7 @@ $invoice = $commet->invoices->updateStatus(
|
|
|
215
215
|
);
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
Only outstanding invoices can be marked `paid` or `void`. This records an external settlement or a deliberate write-off; it does not create a provider transaction.
|
|
218
|
+
Only outstanding invoices can be marked `paid` or `void`. This records an external settlement or a deliberate write-off; it does not create a provider transaction. A credit purchase, top-up or add-on invoice still awaiting payment confirmation can't be marked `paid` by hand: it is paid when the payment provider confirms the payment. Marking it `void` cancels the purchase; if the payment is confirmed later, it is refunded.
|
|
219
219
|
|
|
220
220
|
## Send or download
|
|
221
221
|
|
|
@@ -69,7 +69,7 @@ Add-ons are managed through the dashboard, the customer portal, or the API.
|
|
|
69
69
|
| **Activate / deactivate** | Dashboard (subscription detail), Customer Portal, or the API |
|
|
70
70
|
| **List active add-ons** | API, Dashboard, or Customer Portal |
|
|
71
71
|
|
|
72
|
-
Activate or deactivate an add-on on a subscription via the SDK. Activation charges the prorated amount for the current period
|
|
72
|
+
Activate or deactivate an add-on on a subscription via the SDK. Activation charges the prorated amount for the current period and the add-on is active once the payment is confirmed: the response's `status` is `active`, or `processing` when the payment method confirms later, such as Pix. Activating it again while that payment is processing returns `409`. Deactivation stops the feature immediately with no refund.
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
75
|
await commet.subscriptions.activateAddon({
|
|
@@ -219,7 +219,7 @@ When a customer activates a $50/month add-on on day 11 of a 31-day period (20 da
|
|
|
219
219
|
| **Prorated** | $50 × (20/31) = **$32.26** |
|
|
220
220
|
| **Invoice type** | `addon_activation` |
|
|
221
221
|
|
|
222
|
-
The charge goes through the subscription's payment provider immediately with its own invoice.
|
|
222
|
+
The charge goes through the subscription's payment provider immediately with its own invoice. The add-on activates when the payment is confirmed; a declined payment voids the invoice and leaves the add-on inactive.
|
|
223
223
|
|
|
224
224
|
### Recurring invoices
|
|
225
225
|
|
|
@@ -159,7 +159,7 @@ $balanceTopup = $commet->subscriptions->topupBalance(
|
|
|
159
159
|
);
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
A top-up charges the payment method attached to the subscription. Customers can also buy balance from the [Customer Portal](/docs/customer-portal).
|
|
162
|
+
A top-up creates its invoice and charges the payment method attached to the subscription. The balance is added once the payment is confirmed: the response's `status` is `succeeded`, or `processing` when the payment method confirms later, such as Pix. A declined payment adds nothing and voids the invoice. Customers can also buy balance from the [Customer Portal](/docs/customer-portal).
|
|
163
163
|
|
|
164
164
|
## Enforce before spending
|
|
165
165
|
|
|
@@ -72,6 +72,26 @@ An event past the limit uses purchased credits. Without enough, [Track Usage](/d
|
|
|
72
72
|
|
|
73
73
|
In the dashboard, open **Plans**, select a credits plan, and edit **Carry-over**, **Credit limit**, or **Buying credits** under **Credit rules**. The changes go into a draft until you publish it.
|
|
74
74
|
|
|
75
|
+
### Make plan credits unlimited
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
curl -X PATCH https://commet.co/api/v1/plans/pln_xxx \
|
|
79
|
+
-H "x-api-key: $COMMET_API_KEY" \
|
|
80
|
+
-H "Content-Type: application/json" \
|
|
81
|
+
-d '{
|
|
82
|
+
"unlimitedPlanCredits": true,
|
|
83
|
+
"planCreditLimit": { "credits": 300, "interval": "day" }
|
|
84
|
+
}'
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
With `unlimitedPlanCredits`, usage never spends plan credits: every event is accepted and still recorded per feature, so you see what each customer consumed. An unlimited plan includes no set amount, so every price includes `0` credits and unused credits can't roll over.
|
|
88
|
+
|
|
89
|
+
`planCreditLimit` still applies. Past the limit, purchased credits are spent, then usage is rejected with `402 plan_credit_limit_reached` until the next window. Without a limit, purchased credits are never spent, so the plan sells no credits or packs. Automatic top-ups don't run while plan credits are unlimited.
|
|
90
|
+
|
|
91
|
+
Usage checks, usage events, feature access and the subscription's `credits` report `unlimited: true` and leave out the plan credit numbers. The same field is `unlimitedPlanBalance` on a balance plan. Changing it publishes a new plan version; moving a subscription to an unlimited version at once expires its unused plan credits.
|
|
92
|
+
|
|
93
|
+
In the dashboard, open **Plans**, select a credits plan, and choose **Unlimited** in **Plan credits** under **What's included**. The change goes into a draft until you publish it.
|
|
94
|
+
|
|
75
95
|
## Balance
|
|
76
96
|
|
|
77
97
|
Customers pay a base price that becomes their spending balance. Feature usage costs real money deducted from the balance. Overage is charged at period end.
|
|
@@ -100,7 +100,7 @@ await commet.subscriptions.purchaseCredits({
|
|
|
100
100
|
})
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
Commet charges the saved payment method at the price per credit of the subscription's plan version and adds purchased credits. Send `creditPackId` instead of `quantity` to buy a pack.
|
|
103
|
+
Commet creates the purchase invoice, charges the saved payment method at the price per credit of the subscription's plan version and adds the purchased credits once the payment is confirmed. Send `creditPackId` instead of `quantity` to buy a pack. The response's `status` is `succeeded` when the credits were added, or `processing` when the payment method confirms later, such as Pix: the credits are added and [`credits.purchased`](/docs/webhooks/credits-purchased) fires when the payment is confirmed. A declined payment adds nothing and voids the invoice.
|
|
104
104
|
|
|
105
105
|
| Response | Cause |
|
|
106
106
|
| ----------------------------- | -------------------------------------------------------------------------- |
|
|
@@ -134,6 +134,8 @@ await commet.subscriptions.updateAutoTopUp({
|
|
|
134
134
|
|
|
135
135
|
Send only the fields that change. Enabling requires a plan with a price per credit. Read the current settings, `status`, `topUpsThisPeriod`, and `lastFailure` with `getAutoTopUp`.
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
While a credit purchase is still processing, auto top-up does not buy again. A top-up confirmed later counts in the period it was triggered; one declined later counts as a failed top-up.
|
|
138
|
+
|
|
139
|
+
Auto top-up pauses after 3 consecutive failed top-ups, or after one whose charge couldn't be refunded. It resumes when the payment method changes, a credit purchase is paid, or you save it enabled again.
|
|
138
140
|
|
|
139
141
|
Customers turn it on and edit it in the [Customer Portal](/docs/customer-portal) under **Auto top-up**. In the dashboard, it appears on the subscription detail.
|
|
@@ -124,7 +124,8 @@ A move never prorates or refunds. With `now`, a larger included amount first pay
|
|
|
124
124
|
|
|
125
125
|
### What a move keeps
|
|
126
126
|
|
|
127
|
-
- **Currency, country, interval, and price.** A move
|
|
127
|
+
- **Currency, country, interval, and price.** A move keeps a subscription's currency unless you ask to charge it in USD. A version that doesn't sell its currency returns `422 missing_regional_price`, and one that doesn't sell the price it pays returns `404 price_not_found`.
|
|
128
|
+
- **Charge in USD.** When the version doesn't sell the currency a subscriber pays in its country, or the USD price of its country, send `currency: "usd"` with the move: from its next renewal it pays the version's USD price for its country, or the USD base price. The currency changes only at a renewal, even for a move made now, and the usage of the period that closes is charged at the USD base rates of the version it leaves. Nothing is converted: when something keeps the subscription in its currency, the move is refused with a code that names it: `currency_held_by_payment_method` (it pays through dLocal), `currency_held_by_customer_credit`, `currency_held_by_balance_plan`, `currency_held_by_fixed_amount_discount`, `currency_held_by_prepaid_period` or `currency_held_by_scheduled_pause`. The same is checked again at the renewal; if it no longer fits, the move is canceled with that code as the `reason` of `subscription.version_change_canceled`.
|
|
128
129
|
- **Market prices.** A subscription that pays a Market price keeps paying it.
|
|
129
130
|
- **Free or paid.** A free version moves only to a free version, and a paid one only to a paid one (`400 validation_error`).
|
|
130
131
|
|
|
@@ -139,12 +140,13 @@ A move never prorates or refunds. With `now`, a larger included amount first pay
|
|
|
139
140
|
|
|
140
141
|
A plan move, a publish with `move`, and an experiment archive check every subscriber first. If any of them doesn't fit, nobody moves and the response is `409 subscribers_do_not_fit`, listing each one with the reasons. Send a change for each one in `changes`:
|
|
141
142
|
|
|
142
|
-
| Change | Effect at the subscriber's renewal
|
|
143
|
-
| --------------------- |
|
|
144
|
-
| `billingInterval` | Moves it to another interval the version sells
|
|
145
|
-
| `seatLimit: true` | Lowers its seats to the version's limit
|
|
146
|
-
| `removeAddonIds` | Stops charging the listed add-ons
|
|
147
|
-
| `
|
|
143
|
+
| Change | Effect at the subscriber's renewal |
|
|
144
|
+
| --------------------- | --------------------------------------------------------------------------------------------- |
|
|
145
|
+
| `billingInterval` | Moves it to another interval the version sells |
|
|
146
|
+
| `seatLimit: true` | Lowers its seats to the version's limit |
|
|
147
|
+
| `removeAddonIds` | Stops charging the listed add-ons |
|
|
148
|
+
| `currency: "usd"` | Charges it in USD when the version doesn't sell its currency, or the USD price of its country |
|
|
149
|
+
| `keepOnVersion: true` | Leaves it on its version |
|
|
148
150
|
|
|
149
151
|
```json
|
|
150
152
|
{
|
|
@@ -39,7 +39,7 @@ In the dashboard, the plan's **Regional prices** tab sets prices country by coun
|
|
|
39
39
|
|
|
40
40
|
Publishing the draft publishes every country together in one plan version. A country missing a price blocks publishing. Through the API, the `countries` block of `PATCH /plans/{id}/drafts/{draftId}` sets the same terms.
|
|
41
41
|
|
|
42
|
-
A subscriber pays the prices of its own country in its version; a buyer from a country the version doesn't list pays the USD base price. A move to another version
|
|
42
|
+
A subscriber pays the prices of its own country in its version; a buyer from a country the version doesn't list pays the USD base price. A move to another version keeps a subscription's currency, and a version that doesn't sell it can't receive the subscription unless the move charges it in USD from its next renewal (see [Move subscribers](/docs/plan-versions#move-subscribers)). The same applies when a canceled subscription is reactivated on the latest version of what was bought: if that version doesn't sell its currency, reactivation returns `422 missing_regional_price`.
|
|
43
43
|
|
|
44
44
|
## Create a Market
|
|
45
45
|
|
|
@@ -549,7 +549,7 @@ curl -X POST https://commet.co/api/v1/subscriptions/sub_xxx/change-version \
|
|
|
549
549
|
-d '{"planVersionId":"plr_xxx","effective":"period_end"}'
|
|
550
550
|
```
|
|
551
551
|
|
|
552
|
-
`period_end` changes everything at the next renewal and nothing before it. `now` changes features, limits, and included credits or balance today and the price from the next renewal. A version change never prorates,
|
|
552
|
+
`period_end` changes everything at the next renewal and nothing before it. `now` changes features, limits, and included credits or balance today and the price from the next renewal. A version change never prorates, keeps the subscription's currency unless `currency: "usd"` charges it in USD from its next renewal (then the whole move happens at that renewal, even with `now`), and keeps a free subscription on a free version and a paid one on a paid version. The response is the subscription: after a move made now, `planVersion` shows the new version; after a move at renewal, `scheduledVersionChange` shows the pending one.
|
|
553
553
|
|
|
554
554
|
A trialing subscription moves when its trial ends, so its first charge is on the new version. A past-due one, once it pays, moves at the end of the period it's paying for. `scheduledVersionChange.effectiveAt` shows that date. If the subscription ends or changes to another plan first, it never moves and no version webhook is sent. A one-time subscription never renews, so `period_end` returns `409 invalid_subscription_status`; move it with `now`.
|
|
555
555
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_balance_plan
|
|
2
|
+
|
|
3
|
+
The subscription is on a balance plan, and its balance is in the currency it pays, so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_balance_plan`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_customer_credit
|
|
2
|
+
|
|
3
|
+
The customer holds credit in the currency the subscription pays, which applies only to invoices in that currency, so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_customer_credit`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version, or move it once that credit is used or revoked.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_fixed_amount_discount
|
|
2
|
+
|
|
3
|
+
The subscription has a fixed-amount discount in the currency it pays still running, so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_fixed_amount_discount`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version, or move it once that discount ends.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_payment_method
|
|
2
|
+
|
|
3
|
+
The subscription pays through a provider that cannot charge it in USD (dLocal: Mercado Pago, Pix, OXXO or a card), so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_payment_method`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version, or move it once it pays with a method that can be charged in USD.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_prepaid_period
|
|
2
|
+
|
|
3
|
+
The subscription has a prepaid period paid in the currency it pays that it has not used, so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_prepaid_period`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version, or move it once that prepaid period is used.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# currency_held_by_scheduled_pause
|
|
2
|
+
|
|
3
|
+
The subscription has a pause scheduled, so a version move cannot charge it in USD.
|
|
4
|
+
|
|
5
|
+
- **Error type:** `billing_error`
|
|
6
|
+
- **`code`:** `currency_held_by_scheduled_pause`
|
|
7
|
+
- **API version:** `2026-08-27`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
Keep the subscription on its version, or move it once the pause is revoked or the subscription resumes.
|
|
13
|
+
|
|
14
|
+
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
|
+
|
|
16
|
+
## Retry behavior
|
|
17
|
+
|
|
18
|
+
Retry with currency usd once the reason no longer applies; a scheduled move that meets it at renewal is canceled with this code as its reason.
|
|
19
|
+
|
|
20
|
+
## Correlate the request
|
|
21
|
+
|
|
22
|
+
Keep the `x-request-id` response header when reporting or investigating this error. Platform records the same identifier in its request event, so Commet can locate the exact execution without customer data or credentials.
|
package/docs/errors/index.md
CHANGED
|
@@ -37,7 +37,13 @@ Use the response `code` to open the matching local reference. Preserve `x-reques
|
|
|
37
37
|
- [`included_limit_reached`](./included_limit_reached.md) — The requested usage exceeds the plan's included usage limit.
|
|
38
38
|
- [`plan_credit_limit_reached`](./plan_credit_limit_reached.md) — The usage event would spend more plan credits than the plan's credit limit allows in the current day or week, and purchased credits do not cover the rest.
|
|
39
39
|
- [`plan_balance_limit_reached`](./plan_balance_limit_reached.md) — The usage event would spend more plan balance than the plan's balance limit allows in the current day or week, and purchased balance does not cover the rest.
|
|
40
|
-
- [`missing_regional_price`](./missing_regional_price.md) — The plan, or the plan version a subscription is moving to, has no price for the subscription's currency or resolved market. A version move
|
|
40
|
+
- [`missing_regional_price`](./missing_regional_price.md) — The plan, or the plan version a subscription is moving to, has no price for the subscription's currency or resolved market. A version move keeps the subscription's currency unless it asks to charge it in USD from its renewal; asking for another currency, or for USD when the version still sells what the subscription pays, is refused with this code, and what keeps a subscription in its currency has its own currency_held_by code.
|
|
41
|
+
- [`currency_held_by_payment_method`](./currency_held_by_payment_method.md) — The subscription pays through a provider that cannot charge it in USD (dLocal: Mercado Pago, Pix, OXXO or a card), so a version move cannot charge it in USD.
|
|
42
|
+
- [`currency_held_by_customer_credit`](./currency_held_by_customer_credit.md) — The customer holds credit in the currency the subscription pays, which applies only to invoices in that currency, so a version move cannot charge it in USD.
|
|
43
|
+
- [`currency_held_by_balance_plan`](./currency_held_by_balance_plan.md) — The subscription is on a balance plan, and its balance is in the currency it pays, so a version move cannot charge it in USD.
|
|
44
|
+
- [`currency_held_by_fixed_amount_discount`](./currency_held_by_fixed_amount_discount.md) — The subscription has a fixed-amount discount in the currency it pays still running, so a version move cannot charge it in USD.
|
|
45
|
+
- [`currency_held_by_prepaid_period`](./currency_held_by_prepaid_period.md) — The subscription has a prepaid period paid in the currency it pays that it has not used, so a version move cannot charge it in USD.
|
|
46
|
+
- [`currency_held_by_scheduled_pause`](./currency_held_by_scheduled_pause.md) — The subscription has a pause scheduled, so a version move cannot charge it in USD.
|
|
41
47
|
- [`payment_failed`](./payment_failed.md) — The operation could not complete its payment or required tax calculation.
|
|
42
48
|
- [`payment_not_found`](./payment_not_found.md) — The requested payment does not exist in this organization.
|
|
43
49
|
- [`payment_method_not_found`](./payment_method_not_found.md) — The requested or required payment method could not be found.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# missing_regional_price
|
|
2
2
|
|
|
3
|
-
The plan, or the plan version a subscription is moving to, has no price for the subscription's currency or resolved market. A version move
|
|
3
|
+
The plan, or the plan version a subscription is moving to, has no price for the subscription's currency or resolved market. A version move keeps the subscription's currency unless it asks to charge it in USD from its renewal; asking for another currency, or for USD when the version still sells what the subscription pays, is refused with this code, and what keeps a subscription in its currency has its own currency_held_by code.
|
|
4
4
|
|
|
5
5
|
- **Error type:** `billing_error`
|
|
6
6
|
- **`code`:** `missing_regional_price`
|
|
@@ -9,13 +9,13 @@ The plan, or the plan version a subscription is moving to, has no price for the
|
|
|
9
9
|
|
|
10
10
|
## What to do
|
|
11
11
|
|
|
12
|
-
Configure the missing regional or currency price identified by the response,
|
|
12
|
+
Configure the missing regional or currency price identified by the response, move the subscription to a version that sells its currency, or ask to charge it in USD from its renewal.
|
|
13
13
|
|
|
14
14
|
The response `message`, `param`, and `details` fields describe the condition observed by the specific operation.
|
|
15
15
|
|
|
16
16
|
## Retry behavior
|
|
17
17
|
|
|
18
|
-
Retry after the required price is configured,
|
|
18
|
+
Retry after the required price is configured, with a version that sells the subscription's currency, or with currency usd when the version does not sell it.
|
|
19
19
|
|
|
20
20
|
## Correlate the request
|
|
21
21
|
|
|
@@ -69,4 +69,4 @@ When you publish a draft in the dashboard, choose whether subscribers of earlier
|
|
|
69
69
|
|
|
70
70
|
A move at the next renewal changes nothing before it. A subscription that ends or changes to another plan by that renewal never moves.
|
|
71
71
|
|
|
72
|
-
A move never prorates or refunds, and it
|
|
72
|
+
A move never prorates or refunds, and it keeps a subscription's currency unless you charge it in USD from its next renewal. A move made now changes features and limits today and the price from the next renewal. See [Move subscribers](/docs/plan-versions#move-subscribers).
|
package/docs/manifest.json
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
},
|
|
117
117
|
"errorReferences": {
|
|
118
118
|
"index": "errors/index.md",
|
|
119
|
-
"count":
|
|
119
|
+
"count": 100,
|
|
120
120
|
"entries": [
|
|
121
121
|
{
|
|
122
122
|
"code": "validation_error",
|
|
@@ -322,6 +322,42 @@
|
|
|
322
322
|
"documentation": "errors/missing_regional_price.md",
|
|
323
323
|
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/missing_regional_price.md"
|
|
324
324
|
},
|
|
325
|
+
{
|
|
326
|
+
"code": "currency_held_by_payment_method",
|
|
327
|
+
"type": "billing_error",
|
|
328
|
+
"documentation": "errors/currency_held_by_payment_method.md",
|
|
329
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_payment_method.md"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"code": "currency_held_by_customer_credit",
|
|
333
|
+
"type": "billing_error",
|
|
334
|
+
"documentation": "errors/currency_held_by_customer_credit.md",
|
|
335
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_customer_credit.md"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"code": "currency_held_by_balance_plan",
|
|
339
|
+
"type": "billing_error",
|
|
340
|
+
"documentation": "errors/currency_held_by_balance_plan.md",
|
|
341
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_balance_plan.md"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"code": "currency_held_by_fixed_amount_discount",
|
|
345
|
+
"type": "billing_error",
|
|
346
|
+
"documentation": "errors/currency_held_by_fixed_amount_discount.md",
|
|
347
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_fixed_amount_discount.md"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"code": "currency_held_by_prepaid_period",
|
|
351
|
+
"type": "billing_error",
|
|
352
|
+
"documentation": "errors/currency_held_by_prepaid_period.md",
|
|
353
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_prepaid_period.md"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"code": "currency_held_by_scheduled_pause",
|
|
357
|
+
"type": "billing_error",
|
|
358
|
+
"documentation": "errors/currency_held_by_scheduled_pause.md",
|
|
359
|
+
"canonicalUrl": "/docs/api-reference/2026-08-27/errors/currency_held_by_scheduled_pause.md"
|
|
360
|
+
},
|
|
325
361
|
{
|
|
326
362
|
"code": "payment_failed",
|
|
327
363
|
"type": "billing_error",
|