@commet/node 9.8.0 → 9.9.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.
Files changed (56) hide show
  1. package/dist/index.d.mts +216 -23
  2. package/dist/index.d.ts +216 -23
  3. package/dist/index.js +6 -6
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +6 -6
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/api-reference/customers.md +2 -0
  8. package/docs/api-reference/generated-webhooks.md +2 -2
  9. package/docs/api-reference/index.md +1 -1
  10. package/docs/api-reference/plans.md +8 -3
  11. package/docs/api-reference/subscriptions.md +7 -5
  12. package/docs/documentation/cli.md +60 -49
  13. package/docs/documentation/create-api-key.md +3 -1
  14. package/docs/documentation/customers/customer-portal.md +10 -2
  15. package/docs/documentation/customers/manage-customers.md +2 -1
  16. package/docs/documentation/finance/payouts.md +11 -0
  17. package/docs/documentation/finance/supported-countries.md +5 -5
  18. package/docs/documentation/invoicing/handle-failed-payments.md +9 -9
  19. package/docs/documentation/payments/accept-one-time-payments.md +1 -1
  20. package/docs/documentation/payments/payment-orchestration.md +2 -0
  21. package/docs/documentation/payments/payment-providers.md +46 -0
  22. package/docs/documentation/payments/transactions-refunds-and-retries.md +1 -1
  23. package/docs/documentation/plans/add-ons.md +1 -1
  24. package/docs/documentation/plans/consumption-models.md +44 -9
  25. package/docs/documentation/plans/credit-packs.md +49 -1
  26. package/docs/documentation/plans/one-time-payments.md +3 -3
  27. package/docs/documentation/plans/plan-groups.md +46 -10
  28. package/docs/documentation/platform/dashboard-metrics-and-events.md +40 -9
  29. package/docs/documentation/sales/connect-dub-affiliates.md +52 -0
  30. package/docs/documentation/sales/introductory-offers.md +7 -13
  31. package/docs/documentation/sales/offers.md +10 -6
  32. package/docs/documentation/sales/promo-codes.md +47 -17
  33. package/docs/documentation/sales/promotional-offers.md +6 -7
  34. package/docs/documentation/sales/regional-prices.md +16 -0
  35. package/docs/documentation/sales/trial-periods.md +67 -40
  36. package/docs/documentation/subscriptions/manage-subscriptions.md +65 -2
  37. package/docs/documentation/subscriptions/pay-in-advance.md +4 -7
  38. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +20 -2
  39. package/docs/documentation/testing-sandbox.md +2 -0
  40. package/docs/documentation/usage/track-usage.md +23 -0
  41. package/docs/errors/index.md +1 -0
  42. package/docs/errors/plan_balance_limit_reached.md +22 -0
  43. package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +8 -8
  44. package/docs/knowledge-base/how-do-discounts-work.md +7 -5
  45. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +14 -8
  46. package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +1 -1
  47. package/docs/knowledge-base/how-do-trial-periods-work.md +30 -24
  48. package/docs/knowledge-base/how-does-billing-work.md +1 -0
  49. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +11 -9
  50. package/docs/manifest.json +12 -2
  51. package/docs/platform-documentation.md +1 -0
  52. package/docs/schemas.md +27 -14
  53. package/docs/webhooks/introduction.md +14 -12
  54. package/docs/webhooks.md +42 -6
  55. package/docs/webhooks.openapi.json +857 -745
  56. package/package.json +1 -1
@@ -194,6 +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 or a Peruvian RUC, for the country of the customer's address. Accepted only where Commet collects tax; a valid ID replaces consumer tax with the business treatment. Send null to remove it.
197
198
  - `externalId` (`string`, optional)
198
199
  - `timezone` (`Timezone`, optional)
199
200
  - `metadata` (`Record<string, unknown>`, optional)
@@ -260,6 +261,7 @@ Create a new customer. Idempotent when customerId is provided. With planGroupId,
260
261
  - `externalId` (`string`, optional)
261
262
  - `fullName` (`string`, optional)
262
263
  - `taxDocument` (`string`, optional)
264
+ - `businessTaxId` (`string`, optional) — Business tax ID, such as an EU VAT number or a Peruvian RUC, for the country of the customer's address. Accepted only where Commet collects tax; a valid ID replaces consumer tax with the business treatment.
263
265
  - `address` (`{ line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string }`, optional)
264
266
  - `addressId` (`string`, optional)
265
267
  - `email` (`string`, required)
@@ -30,7 +30,7 @@ Update a webhook endpoint. Only the provided fields change.
30
30
 
31
31
  - `id` (`string`, required)
32
32
  - `url` (`string`, optional)
33
- - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, optional)
33
+ - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, optional)
34
34
  - `description` (`string | null`, optional)
35
35
  - `isActive` (`boolean`, optional)
36
36
  - `apiVersion` (`string`, optional)
@@ -107,7 +107,7 @@ Create a new webhook endpoint. The response includes the signing secret which is
107
107
  ### Parameters
108
108
 
109
109
  - `url` (`string`, required)
110
- - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.topped_up" | "balance.low" | "balance.depleted" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, required)
110
+ - `events` (`Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">`, required)
111
111
  - `description` (`string`, optional)
112
112
  - `apiVersion` (`string`, optional)
113
113
 
@@ -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) — 87 version-matched error references
8
+ - [API errors](../errors/index.md) — 88 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
@@ -260,7 +260,7 @@ Get a plan with public price IDs and their automatic introductory offer IDs.
260
260
 
261
261
  `PATCH /plans/{id}` · operation `update-plan`
262
262
 
263
- Update a plan's name, description, visibility, default status, metadata, what happens to its unused plan credits, or its plan credit limit.
263
+ Update a plan's name, description, visibility, default status, metadata, overage behavior, what happens to its unused plan credits or plan balance, or its plan credit or plan balance limit.
264
264
 
265
265
  ### Parameters
266
266
 
@@ -271,6 +271,9 @@ Update a plan's name, description, visibility, default status, metadata, what ha
271
271
  - `isPublic` (`boolean`, optional)
272
272
  - `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null }`, optional) — Credits plans only. What happens to unused plan credits at each reset. Existing subscriptions apply it from their next reset.
273
273
  - `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. Raising or removing it applies to existing subscriptions at once; lowering it, adding it or changing its interval applies from their next period.
274
+ - `unusedPlanBalance` (`{ type: "expire" } | { type: "roll_over"; maxPlanBalance: number | null }`, optional) — Balance plans only. What happens to unused plan balance at each reset. Existing subscriptions apply it from their next reset.
275
+ - `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. Raising or removing it applies to existing subscriptions at once; lowering it, adding it or changing its interval applies from their next period.
276
+ - `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. Existing subscriptions apply it from their next reset.
274
277
  - `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.
275
278
 
276
279
  ### Request options
@@ -340,7 +343,7 @@ List plans with public price IDs and their automatic introductory offer IDs.
340
343
 
341
344
  `POST /plans` · operation `create-plan`
342
345
 
343
- Create a new plan with optional consumption model, visibility, and plan group assignment.
346
+ Create a new plan with optional consumption model, visibility, plan group assignment, overage behavior, and the rollover and spend limit of its plan credits or plan balance.
344
347
 
345
348
  ### Parameters
346
349
 
@@ -350,9 +353,11 @@ Create a new plan with optional consumption model, visibility, and plan group as
350
353
  - `consumptionModel` (`"metered" | "credits" | "balance"`, optional)
351
354
  - `isPublic` (`boolean`, optional)
352
355
  - `isFree` (`boolean`, optional)
353
- - `blockOnExhaustion` (`boolean`, optional)
356
+ - `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.
354
357
  - `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.
355
358
  - `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.
359
+ - `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.
360
+ - `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.
356
361
  - `planGroupId` (`string`, optional)
357
362
  - `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.
358
363
  - `metadata` (`Record<string, unknown>`, optional)
@@ -46,7 +46,7 @@ Activate an add-on on a subscription. Charges a prorated amount for the current
46
46
 
47
47
  `GET /subscriptions/{id}/auto-top-up` · operation `get-subscription-auto-top-up`
48
48
 
49
- Read whether the subscription buys credits automatically with its saved payment method when credits reach a threshold, with the top-ups used this period and the last failure.
49
+ Read whether the subscription tops up automatically with its saved payment method when its available credits or balance reach a threshold, with the top-ups used this period and the last failure.
50
50
 
51
51
  ### Parameters
52
52
 
@@ -62,14 +62,15 @@ Read whether the subscription buys credits automatically with its saved payment
62
62
 
63
63
  `PATCH /subscriptions/{id}/auto-top-up` · operation `update-subscription-auto-top-up`
64
64
 
65
- Turn automatic credit purchases on or off and set the threshold, the credits each top-up buys and the maximum top-ups per period. Send only the fields that change. Enabling requires a plan that sells credits. The quantity must be at least the plan's purchase minimum when auto top-up is enabled or when the quantity changes, so turning it off keeps working after the minimum rises. Saving it enabled resumes a paused auto top-up.
65
+ Turn automatic top-ups on or off and set the threshold, the size of each top-up and the maximum top-ups per period. Send only the fields that change. On a credits plan each top-up buys `quantity` credits; on a balance plan it adds `amount` in minor units of the subscription currency, plus tax, and `threshold` is in the same minor units. Enabling requires a plan that sells credits or has balance top-ups on. The size must be at least the plan's minimum when auto top-up is enabled or when the size changes, so turning it off keeps working after the minimum rises. Saving it enabled resumes a paused auto top-up.
66
66
 
67
67
  ### Parameters
68
68
 
69
69
  - `id` (`string`, required)
70
70
  - `enabled` (`boolean`, optional)
71
71
  - `threshold` (`number`, optional)
72
- - `quantity` (`number`, optional)
72
+ - `quantity` (`number`, optional) — Credits each top-up buys. Credits plans only.
73
+ - `amount` (`number`, optional) — Minor units of the subscription currency each top-up adds. Balance plans only.
73
74
  - `maxPerPeriod` (`number`, optional)
74
75
 
75
76
  ### Request options
@@ -109,12 +110,12 @@ Adjust a subscription's balance or credits by a signed amount. Positive adds, ne
109
110
 
110
111
  `POST /subscriptions/{id}/balance/topup` · operation `topup-balance`
111
112
 
112
- Top up a subscription's balance. Charges the customer's payment method for the specified amount.
113
+ Top up a balance subscription. Charges the customer's payment method for the amount plus tax, adds it to the subscription's purchased balance (after paying back any overage owed on the plan balance), creates its invoice 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.
113
114
 
114
115
  ### Parameters
115
116
 
116
117
  - `id` (`string`, required)
117
- - `amount` (`number`, required)
118
+ - `amount` (`number`, required) — The amount to add, in minor units of the subscription currency (cents; whole units for zero-decimal currencies).
118
119
 
119
120
  ### Request options
120
121
 
@@ -533,6 +534,7 @@ Create a subscription for a customer. Commet selects the default price when pric
533
534
  - `priceId` (`string`, optional) — Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing.
534
535
  - `initialSeats` (`Record<string, number>`, optional)
535
536
  - `provider` (`"stripe" | "commet" | "dlocal" | string`, optional) — Payment provider name or exact public payment connection ID for the initial checkout. Overrides country routing when present.
537
+ - `paymentMethodTypes` (`Array<"card" | "oxxo" | "mercado_pago" | "google_pay" | "smartpix">`, optional) — Payment methods the initial checkout may offer. Restricts what the checkout already offers for the buyer's country, currency and payment connection; it never enables a method the connection does not have and never changes routing. When none of them is available to the buyer, the checkout shows that it cannot accept payments.
536
538
  - `name` (`string`, optional)
537
539
  - `startDate` (`string`, optional)
538
540
  - `successUrl` (`string`, optional)
@@ -222,17 +222,18 @@ commet customers create \
222
222
  --metadata '{"plan":"enterprise"}'
223
223
  ```
224
224
 
225
- | Flag | Required | Description |
226
- | ------------------------ | -------- | ----------------------------------------------------- |
227
- | `--email <email>` | Yes | Billing email |
228
- | `--id <id>` | No | Custom customer ID |
229
- | `--external-id <id>` | No | ID from your system |
230
- | `--full-name <name>` | No | Full name |
231
- | `--tax-document <value>` | No | Tax document |
232
- | `--timezone <tz>` | No | Timezone |
233
- | `--metadata <json>` | No | Metadata as JSON object |
234
- | `--address <json>` | No | Address as JSON: `{line1, city, postalCode, country}` |
235
- | `--address-id <id>` | No | Existing customer address ID |
225
+ | Flag | Required | Description |
226
+ | ------------------------ | -------- | -------------------------------------------------------------- |
227
+ | `--email <email>` | Yes | Billing email |
228
+ | `--id <id>` | No | Custom customer ID |
229
+ | `--external-id <id>` | No | ID from your system |
230
+ | `--full-name <name>` | No | Full name |
231
+ | `--tax-document <value>` | No | Tax document |
232
+ | `--timezone <tz>` | No | Timezone |
233
+ | `--metadata <json>` | No | Metadata as JSON object |
234
+ | `--address <json>` | No | Address as JSON: `{line1, city, postalCode, country}` |
235
+ | `--address-id <id>` | No | Existing customer address ID |
236
+ | `--plan-group-id <id>` | No | Start the customer on the group's signup trial or default plan |
236
237
 
237
238
  ```bash
238
239
  commet customers get --id cus_xxx # Get a customer by ID
@@ -276,9 +277,9 @@ commet subscriptions create \
276
277
  | `--billing-interval <interval>` | No | `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`, `one_time` |
277
278
  | `--price-id <id>` | No | Selectable plan price. Omit it to use the interval default and its market pricing |
278
279
  | `--initial-seats <json>` | No | Initial seats as JSON: `{featureCode: count}` |
279
- | `--skip-trial <bool>` | No | Skip trial period |
280
- | `--custom-trial-days <n>` | No | Override the catalog trial duration |
281
- | `--offer-id <id>` | No | Apply an Offer directly. Cannot be combined with `promo-code` or a custom trial |
280
+ | `--skip-trial <bool>` | No | Start without the price's trial |
281
+ | `--custom-trial-days <n>` | No | Trial days replacing the price's trial |
282
+ | `--offer-id <id>` | No | Apply an Offer directly. Cannot be combined with `promo-code` |
282
283
  | `--promo-code <code>` | No | Apply the Offer referenced by a customer-entered code |
283
284
  | `--provider <provider>` | No | Initial checkout provider override: `stripe`, `commet`, or `dlocal` |
284
285
  | `--name <name>` | No | Subscription name |
@@ -308,6 +309,8 @@ commet subscriptions get-active --customer-id user_123 # Get active su
308
309
  commet subscriptions uncancel --id sub_xxx # Revert pending cancellation
309
310
  commet subscriptions reactivate --id sub_xxx --offer-id ofr_xxx # Reactivate a canceled subscription with a direct Offer
310
311
  commet subscriptions change-plan --id sub_xxx --new-plan-id pln_xxx --new-billing-interval yearly # Change plan
312
+ commet subscriptions change-plan --id sub_xxx --new-plan-id pln_xxx --promo-code LAUNCH50 # Change plan with a promo code
313
+ commet subscriptions revoke-scheduled-plan-change --id sub_xxx # Keep the current plan
311
314
  commet subscriptions list # List all subscriptions
312
315
  commet subscriptions list --customer-id user_123 --status active # Filter by customer/status
313
316
  commet subscriptions preview-change --id sub_xxx --plan-id pln_xxx --billing-interval yearly # Preview proration
@@ -316,6 +319,9 @@ commet subscriptions deactivate-addon --id sub_xxx --addon-id adn_xxx
316
319
  commet subscriptions adjust-balance --id sub_xxx --amount 1000 --type balance --reason "Courtesy credit"
317
320
  commet subscriptions topup-balance --id sub_xxx --amount 5000
318
321
  commet subscriptions purchase-credits --id sub_xxx --credit-pack-id cpk_xxx
322
+ commet subscriptions purchase-credits --id sub_xxx --quantity 500
323
+ commet subscriptions get-auto-top-up --id sub_xxx
324
+ commet subscriptions update-auto-top-up --id sub_xxx --enabled true --threshold 100 --quantity 500 --max-per-period 3
319
325
  ```
320
326
 
321
327
  ## Plans
@@ -339,17 +345,20 @@ commet plans create \
339
345
  --block-on-exhaustion true
340
346
  ```
341
347
 
342
- | Flag | Required | Description |
343
- | ------------------------------ | -------- | ------------------------------------------ |
344
- | `--name <name>` | Yes | Plan name |
345
- | `--code <code>` | Yes | Plan code |
346
- | `--description <desc>` | No | Plan description |
347
- | `--consumption-model <model>` | No | `metered`, `credits`, or `balance` |
348
- | `--is-public <bool>` | No | Whether plan is publicly visible |
349
- | `--is-free <bool>` | No | Whether plan is free |
350
- | `--block-on-exhaustion <bool>` | No | Block usage when balance/credits exhausted |
351
- | `--plan-group-id <id>` | No | Plan group ID |
352
- | `--metadata <json>` | No | Metadata as JSON object |
348
+ | Flag | Required | Description |
349
+ | ------------------------------ | -------- | ---------------------------------------------------------------------------------- |
350
+ | `--name <name>` | Yes | Plan name |
351
+ | `--code <code>` | Yes | Plan code |
352
+ | `--description <desc>` | No | Plan description |
353
+ | `--consumption-model <model>` | No | `metered`, `credits`, or `balance` |
354
+ | `--is-public <bool>` | No | Whether plan is publicly visible |
355
+ | `--is-free <bool>` | No | Whether plan is free |
356
+ | `--block-on-exhaustion <bool>` | No | Block usage when balance/credits exhausted |
357
+ | `--plan-group-id <id>` | No | Plan group ID |
358
+ | `--is-default <bool>` | No | Make this free plan the default plan of its group |
359
+ | `--unused-plan-credits <json>` | No | Credits plans: `{"type":"expire"}` or `{"type":"roll_over","maxPlanCredits":5000}` |
360
+ | `--plan-credit-limit <json>` | No | Credits plans: `{"credits":100,"interval":"day"}` |
361
+ | `--metadata <json>` | No | Metadata as JSON object |
353
362
 
354
363
  **`commet plans add-feature`**
355
364
 
@@ -404,18 +413,19 @@ commet plans add-price \
404
413
  --trial-days 14
405
414
  ```
406
415
 
407
- | Flag | Required | Description |
408
- | ------------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |
409
- | `--plan-id <id>` | Yes | Plan ID |
410
- | `--billing-interval <interval>` | Yes | `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`, `one_time` |
411
- | `--price <n>` | One of `price` / `inherits-from-price-id` | Base price in the currency's minor unit |
412
- | `--inherits-from-price-id <id>` | One of `price` / `inherits-from-price-id` | Base price inherited by a selectable variant |
413
- | `--trial-days <n>` | No | Trial period in days |
414
- | `--is-default <bool>` | No | Set as default price |
415
- | `--included-balance <n>` | No | Included balance amount |
416
- | `--included-credits <n>` | No | Included credits amount |
417
- | `--market-prices <json>` | Required for a variant | Market prices as `{marketGroupId, currency, price}` objects |
418
- | `--metadata <json>` | No | Price metadata |
416
+ | Flag | Required | Description |
417
+ | ---------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |
418
+ | `--plan-id <id>` | Yes | Plan ID |
419
+ | `--billing-interval <interval>` | Yes | `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`, `one_time` |
420
+ | `--price <n>` | One of `price` / `inherits-from-price-id` | Base price in the currency's minor unit |
421
+ | `--inherits-from-price-id <id>` | One of `price` / `inherits-from-price-id` | Base price inherited by a selectable variant |
422
+ | `--trial-days <n>` | No | Free trial days, `0` to `730` |
423
+ | `--trial-requires-payment-method <bool>` | No | `false` starts the trial without checkout |
424
+ | `--is-default <bool>` | No | Set as default price |
425
+ | `--included-balance <n>` | No | Included balance amount |
426
+ | `--included-credits <n>` | No | Included credits amount |
427
+ | `--market-prices <json>` | Required for a variant | Market prices as `{marketGroupId, currency, price}` objects |
428
+ | `--metadata <json>` | No | Price metadata |
419
429
 
420
430
  Create a selectable variant that changes only Argentina and inherits the rest of the base price:
421
431
 
@@ -736,11 +746,11 @@ Create reusable Offers independently from plans and distribution channels.
736
746
 
737
747
  ```bash
738
748
  commet offers create \
739
- --name "14 days free, then 25% off" \
740
- --phases '[{"type":"free_trial","durationDays":14},{"type":"percentage","percentage":2500,"durationCycles":3}]'
749
+ --name "25% off for 3 cycles" \
750
+ --phases '[{"type":"percentage","percentage":2500,"durationCycles":3}]'
741
751
  ```
742
752
 
743
- `percentage` uses basis points, so `2500` means 25%. Other phase types are `free_trial`, `amount_off`, and `fixed_price`.
753
+ `percentage` uses basis points, so `2500` means 25%. Other phase types are `amount_off` and `fixed_price`. Set trials on the plan price with `--trial-days`.
744
754
 
745
755
  ```bash
746
756
  commet offers list --active true
@@ -749,7 +759,7 @@ commet offers update --id ofr_xxx --name "Launch offer" --phases '[{"type":"fixe
749
759
  commet offers delete --id ofr_xxx
750
760
  ```
751
761
 
752
- An Offer does not contain `purpose` or plan-price associations. Attach a compatible Offer to a base price in the Dashboard for automatic introductory selection, pass its ID directly as `offerId`, or reference a single-discount Offer from a Promo Code.
762
+ An Offer does not contain `purpose` or plan-price associations. Attach a compatible Offer to a base price in the Dashboard for automatic introductory selection, pass its ID directly as `offerId`, or reference it from a Promo Code.
753
763
 
754
764
  ## Promo Codes
755
765
 
@@ -775,14 +785,15 @@ commet promo-codes create \
775
785
  --expires-at 2026-12-31
776
786
  ```
777
787
 
778
- | Flag | Required | Description |
779
- | ------------------------------- | -------- | ------------------------------------------------------------ |
780
- | `--code <code>` | Yes | Promo code string |
781
- | `--offer-id <id>` | Yes | Offer ID with exactly one `percentage` or `amount_off` phase |
782
- | `--billing-interval <interval>` | No | Restrict redemption to one billing interval |
783
- | `--max-redemptions <n>` | No | Maximum number of redemptions |
784
- | `--expires-at <date>` | No | Expiration date (ISO 8601) |
785
- | `--plan-ids <json>` | No | Restrict to specific plan IDs (JSON array) |
788
+ | Flag | Required | Description |
789
+ | ------------------------------- | -------- | ----------------------------------------------------- |
790
+ | `--code <code>` | Yes | Promo code string |
791
+ | `--offer-id <id>` | Yes | Offer ID |
792
+ | `--billing-interval <interval>` | No | Restrict redemption to one billing interval |
793
+ | `--max-redemptions <n>` | No | Maximum number of redemptions |
794
+ | `--expires-at <date>` | No | Expiration date (ISO 8601) |
795
+ | `--plan-ids <json>` | No | Restrict to specific plan IDs (JSON array) |
796
+ | `--first-purchase-only <bool>` | No | Only for a customer's first purchase. Default `false` |
786
797
 
787
798
  ```bash
788
799
  commet promo-codes list # List all promo codes
@@ -16,7 +16,7 @@ Choose the path that fits where you are working. You only need one to get starte
16
16
  1. Select your **sandbox organization** in the dashboard.
17
17
  2. Go to **Settings → API Keys** and click **Create API Key**.
18
18
  3. Choose **Full Access** for a backend or **AI Agents** to select resource permissions.
19
- 4. Enter a descriptive name, such as `Local development`, and choose **Expires In (Days)**. The dashboard accepts **1–365 days** and defaults to **365**.
19
+ 4. Enter a descriptive name of up to 32 characters, such as `Local development`, and choose **Expires In (Days)**. The dashboard accepts **1–365 days** and defaults to **365**.
20
20
  5. Create the key and copy it before closing the dialog. The full secret is shown only once.
21
21
 
22
22
  ### CLI
@@ -117,6 +117,8 @@ Use a separate key for each application or deployment that needs independent rot
117
117
  3. Verify a successful read with the replacement and confirm the application is using it.
118
118
  4. Delete the old key from **Settings → API Keys** or through [Delete API key](/docs/api-reference/api-keys/delete-api-key).
119
119
 
120
+ A deleted key stops authenticating within about 5 seconds. A key's last use, **Last used** in the dashboard and `lastUsedAt` in [List API keys](/docs/api-reference/api-keys/list-api-keys), can lag up to 5 minutes.
121
+
120
122
  For production, create a key in your **live organization** and store it separately from sandbox credentials. Do not copy sandbox customer, plan, or subscription IDs into live configuration. Before switching, verify checkout, webhooks, and a renewal in sandbox with the [Test Clock](/docs/testing-sandbox).
121
123
 
122
124
  Next, follow the [quickstart](/docs/choose-a-billing-model) to complete your first subscription payment in sandbox.
@@ -9,14 +9,22 @@ Self-service page where customers manage their subscription, view usage, change
9
9
 
10
10
  - View current subscription and billing cycle
11
11
  - See usage across all features
12
- - Upgrade or downgrade plans (requires a [Plan Group](/docs/plan-groups))
13
- - Purchase [Credit Packs](/docs/credit-packs), balance top-ups, and [Add-ons](/docs/add-ons)
12
+ - Upgrade or downgrade plans (requires a [Plan Group](/docs/plan-groups)), and keep the current plan when a change is scheduled (**Keep current plan**)
13
+ - Purchase [Credit Packs](/docs/credit-packs), a chosen quantity of credits, balance top-ups, and [Add-ons](/docs/add-ons)
14
+ - Turn on and edit [auto top-up](/docs/credit-packs#top-up-credits-automatically) for credits
15
+ - Add a card during a [trial without a payment method](/docs/trial-periods#start-a-trial-without-a-payment-method) (**Add card**)
14
16
  - Manage saved payment methods and billing details
15
17
  - View invoice history
16
18
  - Cancel subscription
17
19
 
18
20
  Purchases are available on active, trialing, and free plan subscriptions. Free plan customers are prompted to add a payment method on their first purchase.
19
21
 
22
+ When the plan group has a [default plan](/docs/plan-groups#default-plan-and-signup-trial), canceling a paid plan from the portal moves the customer to that default plan at period end instead of canceling.
23
+
24
+ ## Languages
25
+
26
+ The portal and checkout open in English, Spanish, or Portuguese, following the customer's browser language, and in English otherwise. Customer emails are sent in English or Spanish.
27
+
20
28
  ## Saved payment methods
21
29
 
22
30
  Your customers can save several cards and choose their default payment method. A new card becomes the default unless the customer saves it as an alternative. The first saved card is always the default.
@@ -85,6 +85,7 @@ Use:
85
85
  - `email` for billing communication.
86
86
  - `address` and `taxDocument` for billing and tax context.
87
87
  - `metadata` for application-specific values that do not control billing behavior.
88
+ - `planGroupId` to start the customer at once on the group's signup trial or default plan. See [Plan Groups](/docs/plan-groups#default-plan-and-signup-trial).
88
89
 
89
90
  ## Create customers in batch
90
91
 
@@ -154,7 +155,7 @@ $customerBatch = $commet->customers->createBatch(
154
155
  );
155
156
  ```
156
157
 
157
- A batch accepts up to 100 customers and returns successful and failed items independently.
158
+ A batch accepts up to 100 customers and returns successful and failed items independently. With `planGroupId`, each customer without an open subscription starts on the group's starting plan.
158
159
 
159
160
  ## Retrieve a customer
160
161
 
@@ -17,6 +17,7 @@ Verify your account, then request a payout of $10 or more from your available ba
17
17
 
18
18
  - Minimum payout: **$10**.
19
19
  - Money reaches your bank account in **up to 7 business days**.
20
+ - Receipts and statements are not available in sandbox.
20
21
  - **No payout fee.**
21
22
  - Account verification is required before your first payout.
22
23
 
@@ -26,9 +27,19 @@ Only your **Available** balance can be paid out. See the balance states in [Fina
26
27
 
27
28
  Navigate to **Payouts**. Add your bank accounts, then click **Withdraw funds** to request a payout from your available balance.
28
29
 
30
+ ## Download receipts and monthly statements
31
+
32
+ Live organizations with a Commet payout account get two documents:
33
+
34
+ - **Payout receipt**: a PDF for each paid payout. Open the payout in **Payouts** and click **Download**.
35
+ - **Monthly statement**: a PDF and a CSV with the opening balance, movements, closing balance, and the available, pending, held, and in-transit amounts. Find them in **Settings → Monthly statements**.
36
+
37
+ Statements cover a calendar month in UTC and are issued on the 2nd of the following month. A month with no movements and no balance has no statement. Documents exist from their launch onward; earlier payouts and months have none.
38
+
29
39
  ## Limitations
30
40
 
31
41
  - Minimum payout is **$10**.
32
42
  - Only the **Available** balance can be withdrawn — Pending funds cannot.
33
43
  - Account verification is required before the first payout.
34
44
  - Money reaches your bank account in **up to 7 business days**.
45
+ - Receipts and statements are not available in sandbox.
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  title: Supported Countries
3
- description: Commet supports businesses in 112 countries across the Americas, Europe, Asia and Pacific, and Africa, and your country sets your payout currency.
3
+ description: Commet supports businesses in 88 countries across the Americas, Europe, Asia and Pacific, and Africa, and your country sets your payout currency.
4
4
  ---
5
5
 
6
- Commet supports businesses in 112 countries across all major regions. Your country is set during onboarding and determines your payout currency and compliance requirements.
6
+ Commet supports businesses in 88 countries across all major regions. Your country is set during onboarding and determines your payout currency and compliance requirements.
7
7
 
8
8
  ## Americas
9
9
 
@@ -11,12 +11,12 @@ Argentina, Bolivia, Brazil, Canada, Chile, Colombia, Costa Rica, Dominican Repub
11
11
 
12
12
  ## Europe
13
13
 
14
- Albania, Austria, Belgium, Bosnia & Herzegovina, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Moldova, Montenegro, Netherlands, North Macedonia, Norway, Poland, Portugal, Romania, San Marino, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom
14
+ Albania, Austria, Belgium, Bosnia & Herzegovina, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Netherlands, Norway, Poland, Portugal, Romania, San Marino, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom
15
15
 
16
16
  ## Asia & Pacific
17
17
 
18
- Armenia, Australia, Azerbaijan, Bahrain, Bangladesh, Bhutan, Brunei, Cambodia, Hong Kong, India, Indonesia, Israel, Japan, Jordan, Kazakhstan, South Korea, Kuwait, Laos, Malaysia, Mongolia, New Zealand, Oman, Pakistan, Philippines, Qatar, Singapore, Sri Lanka, Taiwan, Thailand, United Arab Emirates, Vietnam
18
+ Armenia, Australia, Azerbaijan, Brunei, Hong Kong, India, Indonesia, Israel, Japan, Kazakhstan, Laos, Mongolia, New Zealand, Philippines, Qatar, Singapore, Sri Lanka, Thailand
19
19
 
20
20
  ## Africa
21
21
 
22
- Algeria, Angola, Benin, Botswana, Côte d’Ivoire, Egypt, Ethiopia, Gabon, Gambia, Ghana, Kenya, Mauritius, Morocco, Mozambique, Namibia, Niger, Nigeria, Rwanda, Senegal, South Africa, Tanzania, Tunisia
22
+ Algeria, Angola, Botswana, Egypt, Ethiopia, Gambia, Ghana, Kenya, Mauritius, Morocco, Mozambique, Namibia, Nigeria, South Africa, Tanzania
@@ -13,24 +13,24 @@ When a renewal payment fails, the subscription moves to `past_due` and enters du
13
13
  4. The customer receives an email notification
14
14
  5. Commet retries the charge on a fixed schedule (dunning)
15
15
 
16
- If a retry succeeds, the subscription returns to `active`. If all retries fail, the subscription is canceled and the invoice is marked as `uncollectible`.
16
+ If a retry succeeds, the subscription returns to `active`. If all retries fail, the invoice is marked as `uncollectible` and the subscription is canceled. When the plan's group has a [default plan](/docs/plan-groups#default-plan-and-signup-trial), the subscription moves to it instead and `subscription.plan_changed` fires.
17
17
 
18
18
  ## Provider error mapping
19
19
 
20
20
  Commet translates provider responses into a common payment outcome and keeps the provider detail alongside it. For recurring failures, the [`payment.failed`](/docs/webhooks/payment-failed) webhook exposes `failureCode`, `failureMessage`, and a `recoveryUrl` when a recovery path is available. The exact `failureCode` depends on the provider, so use the normalized outcome and the recovery URL for customer handling instead of matching only one provider's raw codes.
21
21
 
22
- | Payment outcome | What it means | What to do |
23
- | ------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
24
- | `requires_action` | The provider needs an additional customer step, such as 3D Secure | Keep the customer in checkout and complete the authentication flow |
25
- | `PAYMENT_FAILED` with a decline code | The provider rejected the charge | Show a retry or alternate payment method and record the provider code for support |
26
- | `payment.failed` | A recurring charge failed and the invoice entered dunning | Keep service during the grace window, communicate the recovery path, and wait for a retry or recovery |
27
- | `payment.retry_failed` | All scheduled dunning retries were exhausted | Revoke access according to your product policy and ask the customer to start a new subscription or contact support |
22
+ | Payment outcome | What it means | What to do |
23
+ | ------------------------------------ | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
24
+ | `requires_action` | The provider needs an additional customer step, such as 3D Secure | Keep the customer in checkout and complete the authentication flow |
25
+ | `PAYMENT_FAILED` with a decline code | The provider rejected the charge | Show a retry or alternate payment method and record the provider code for support |
26
+ | `payment.failed` | A recurring charge failed and the invoice entered dunning | Keep service during the grace window, communicate the recovery path, and wait for a retry or recovery |
27
+ | `payment.retry_failed` | All scheduled dunning retries were exhausted | Revoke paid access according to your product policy and ask the customer to start a new subscription or contact support |
28
28
 
29
29
  Initial checkout card declines do not emit `payment.failed`; the checkout response carries the failure state directly. Recurring failures use the dunning flow below.
30
30
 
31
31
  ## Automatic retries
32
32
 
33
- Retries run on day 1, day 3, day 5, and day 7 after the original failure (4 retries). The calendar is anchored to the failure and never moves. After the last failed retry the subscription is canceled.
33
+ Retries run on day 1, day 3, day 5, and day 7 after the original failure (4 retries). The calendar is anchored to the failure and never moves. After the last failed retry the subscription is canceled, or moves to the plan group's default plan.
34
34
 
35
35
  Manual retries from the Customer Portal or [`reactivate`](#retry-the-charge-server-to-server) use the default payment method and have separate daily limits. They do not consume automatic retry slots or start another charge while an automatic retry is in progress.
36
36
 
@@ -48,7 +48,7 @@ Commet sends a payment-failure notification when a recurring charge enters dunni
48
48
 
49
49
  - [`payment.failed`](/docs/webhooks/payment-failed) — a recurring charge failed; use `failureCode`, `failureMessage`, and `recoveryUrl` to explain the next step.
50
50
  - [`payment.recovered`](/docs/webhooks/payment-recovered) — the outstanding invoice was paid and the subscription returned to `active`.
51
- - [`payment.retry_failed`](/docs/webhooks/payment-retry-failed) — all retries were exhausted and the subscription was canceled.
51
+ - [`payment.retry_failed`](/docs/webhooks/payment-retry-failed) — all retries were exhausted and the subscription was canceled or moved to the default plan.
52
52
 
53
53
  Send your own email, SMS, or in-app message when you need product-specific copy. Do not create a second retry schedule in your app; use Commet's events to close the communication loop.
54
54
 
@@ -9,7 +9,7 @@ Commet calculates tax, generates an invoice, and sends a receipt on every paymen
9
9
 
10
10
  > **Note**
11
11
  >
12
- > For lifetime deals and one-off purchases billed as a **plan** (trials, intro offers, add-ons, consumption models), use [One-Time Plans](/docs/one-time-payments) instead.
12
+ > For lifetime deals and one-off purchases billed as a **plan** (add-ons, consumption models), use [One-Time Plans](/docs/one-time-payments) instead.
13
13
 
14
14
  ## Link vs. charge
15
15
 
@@ -17,6 +17,8 @@ Customers can update their method through the [Customer Portal](/docs/customer-p
17
17
 
18
18
  In **Settings → Payments**, use **Payment routing** to assign countries to connected providers. You can select individual countries or region presets, then save the assignment. The map and routing list show which provider will handle each country.
19
19
 
20
+ Each connected account gets its own countries, including [several Stripe or dLocal accounts](/docs/payment-providers#connect-several-accounts-of-the-same-provider) in one organization. Label them with **Edit alias** to tell them apart.
21
+
20
22
  For a new checkout or other new activity, Commet resolves the customer's billing country as an ISO country code and looks up that country's route. For example, a customer whose billing address has `BR` uses the provider assigned to Brazil. The route is based on the billing address supplied to Commet, not on the customer's IP address.
21
23
 
22
24
  If a subscription already has a saved payment connection, recurring charges continue through that connection. This preserves the location of the vaulted payment method. When there is no saved connection, Commet uses the country route; when no country is available, it uses the organization's default provider.
@@ -19,6 +19,14 @@ To connect your own account:
19
19
 
20
20
  Commet registers and consumes the provider webhooks required to keep payment, refund, dispute, and setup events synchronized. You do not need to create a second billing integration for the connected account.
21
21
 
22
+ ### Connect several accounts of the same provider
23
+
24
+ An organization can connect more than one Stripe or dLocal account, for example one dLocal account for Argentina and another for Brazil and Mexico. Each additional account starts with no countries and is not the default.
25
+
26
+ Give each account a label with **Edit alias** in its menu, then assign its countries in **Payment routing**. When you have several accounts of the same provider, Payment routing shows each connection ID (`pcon_...`) to copy.
27
+
28
+ To pin a subscription's first checkout to one account, pass its connection ID as `provider` when [creating the subscription](/docs/manage-subscriptions#create). `provider: "stripe"` or `"dlocal"` uses the oldest connected account of that provider.
29
+
22
30
  ### Stripe credentials
23
31
 
24
32
  Provide the Stripe **secret key** and **publishable key** for the account you own. In sandbox mode, use `sk_test_...` and `pk_test_...` keys. In live mode, use `sk_live_...` and `pk_live_...` keys. Commet rejects keys from the wrong mode.
@@ -27,6 +35,44 @@ Provide the Stripe **secret key** and **publishable key** for the account you ow
27
35
 
28
36
  Provide the credentials issued for the matching dLocal environment: **X-Login**, **X-Trans-Key**, **Secret Key**, and the **API key (dlocal.js)**. Commet validates the account before saving the connection.
29
37
 
38
+ ## Choose payment methods per connection
39
+
40
+ Stripe and Commet connections accept cards. A dLocal connection can also offer local methods; each one applies only to that connection.
41
+
42
+ Open **Settings → Payments**, open the connection menu, and choose **Payment methods**. Enable a method in your dLocal account before turning it on in Commet.
43
+
44
+ | Method | Where it's offered |
45
+ | ------------ | ------------------------- |
46
+ | Card | All countries |
47
+ | Google Pay | All countries |
48
+ | Mercado Pago | Argentina, in ARS |
49
+ | OXXO | Mexico, as a cash voucher |
50
+ | SmartPix | Brazil, in BRL |
51
+
52
+ A country method appears under **Not available for this connection** until its country is assigned to the connection. Google Pay asks for the **dLocal gateway merchant ID**, the **Google merchant ID** (optional in sandbox), and the **Business name** buyers see.
53
+
54
+ The `paymentMethod` of each [transaction](/docs/transactions-refunds-and-retries) names the method used: `card`, `google_pay`, `mercado_pago`, `oxxo`, or `smartpix`.
55
+
56
+ ### Limit the methods of one checkout
57
+
58
+ To offer only some methods in a subscription's first checkout, pass `paymentMethodTypes` when [creating the subscription](/docs/manage-subscriptions#create), for example `["oxxo"]`. The list only narrows what the checkout already offers for the buyer's country and connection: it never turns on a method or changes which connection the checkout uses. With `["card", "oxxo"]`, a buyer in Mexico sees card and OXXO, and a buyer in Argentina sees only card. Pass `provider` as well to choose the connection.
59
+
60
+ Every method in the list must be turned on in the `provider` connection, or in one of your connections when you don't pass `provider`. Otherwise the request fails with `validation_error` naming that method. A plan that starts with a card trial also rejects methods that can't be saved for renewals, such as OXXO.
61
+
62
+ When no method in the list is available to the buyer, the checkout shows that it can't accept payments and charges nothing. A new checkout for the same invoice, for example after an OXXO voucher expires, keeps the list.
63
+
64
+ ### Mercado Pago
65
+
66
+ The customer authorizes Mercado Pago once in checkout. Commet charges the first payment after the authorization is active, and charges renewals to it automatically.
67
+
68
+ If the customer revokes the authorization in Mercado Pago, Commet removes the saved method and sends the `payment_method.detached` webhook; the subscription does not change. If no other usable method is saved when the next renewal is due, the payment fails and the subscription follows [failed-payment recovery](/docs/what-happens-when-a-payment-fails). The customer can authorize Mercado Pago again from the [Customer Portal](/docs/customer-portal).
69
+
70
+ ### OXXO
71
+
72
+ OXXO is a cash voucher. Checkout shows it inline with the amount, the expiration date, the barcode, and the reference, which the customer can copy or save. The subscription activates when dLocal confirms the payment.
73
+
74
+ Cash can't renew. A subscription paid with OXXO and no other saved payment method [ends after its paid periods](/docs/pay-in-advance#end-oxxo-subscriptions-after-their-paid-periods) unless the customer adds a card. Combine OXXO with [Pay in Advance](/docs/pay-in-advance) to sell several periods with one voucher.
75
+
30
76
  ## Sandbox and live credentials
31
77
 
32
78
  Sandbox and live credentials belong to different payment environments. Keep test credentials in the Commet sandbox organization and live credentials in the live organization. Never copy a live secret into sandbox or a test key into live.
@@ -67,7 +67,7 @@ $transactionsListResult = $commet->transactions->list();
67
67
 
68
68
  One invoice can have multiple transactions when a renewal is retried. The original failed transaction remains immutable; a retry creates a new attempt.
69
69
 
70
- `provider` names the processor. `paymentMethod` names the method used for that attempt (`card`, `mercado_pago`, or `oxxo`), or is `null` when unknown. It stays tied to the transaction if the customer changes their saved method later.
70
+ `provider` names the processor. `paymentMethod` names the method used for that attempt (`card`, `google_pay`, `mercado_pago`, `oxxo`, or `smartpix`), or is `null` when unknown. It stays tied to the transaction if the customer changes their saved method later.
71
71
 
72
72
  `subPaymentMethod` describes how a Mercado Pago charge was funded when dLocal reports it: `credit_card`, `debit_card`, `prepaid_card`, `bank_transfer`, or `account_money`. It is `null` when unavailable or unknown. The dashboard also shows the card brand and last four digits when dLocal provides them for that charge.
73
73