@commet/node 9.0.0 → 9.1.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/README.md +2 -0
- package/dist/index.d.mts +333 -111
- package/dist/index.d.ts +333 -111
- package/dist/index.js +162 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -40
- package/dist/index.mjs.map +1 -1
- package/docs/README.md +20 -0
- package/docs/ai-onboarding/ai-onboarding.md +90 -0
- package/docs/ai-onboarding/billing-best-practices-skill.md +29 -0
- package/docs/ai-onboarding/commet-skill.md +58 -0
- package/docs/ai-onboarding/mcp-server.md +207 -0
- package/docs/ai-onboarding/meta.json +17 -0
- package/docs/ai-onboarding/pricing-models-skill.md +29 -0
- package/docs/ai-onboarding/subscription-patterns-skill.md +29 -0
- package/docs/api-reference/addons.md +127 -0
- package/docs/api-reference/api-keys.md +57 -0
- package/docs/api-reference/credit-packs.md +80 -0
- package/docs/api-reference/customers.md +274 -0
- package/docs/api-reference/feature-access.md +36 -0
- package/docs/api-reference/features.md +94 -0
- package/docs/api-reference/generated-webhooks.md +120 -0
- package/docs/api-reference/index.md +31 -0
- package/docs/api-reference/invoices.md +123 -0
- package/docs/api-reference/markets.md +92 -0
- package/docs/api-reference/meta.json +7 -0
- package/docs/api-reference/offers.md +104 -0
- package/docs/api-reference/payments.md +106 -0
- package/docs/api-reference/payouts.md +66 -0
- package/docs/api-reference/plan-groups.md +157 -0
- package/docs/api-reference/plans.md +358 -0
- package/docs/api-reference/portal.md +30 -0
- package/docs/api-reference/promo-codes.md +86 -0
- package/docs/api-reference/provisioning.md +19 -0
- package/docs/api-reference/quota.md +120 -0
- package/docs/api-reference/seats.md +123 -0
- package/docs/api-reference/subscriptions.md +387 -0
- package/docs/api-reference/test-clock.md +59 -0
- package/docs/api-reference/transactions.md +78 -0
- package/docs/api-reference/usage.md +83 -0
- package/docs/documentation/api-versioning.md +100 -0
- package/docs/documentation/better-auth.md +361 -0
- package/docs/documentation/choose-a-billing-model.md +38 -0
- package/docs/documentation/cli.md +1024 -0
- package/docs/documentation/create-api-key.md +47 -0
- package/docs/documentation/customers/customer-credits.md +48 -0
- package/docs/documentation/customers/customer-portal.md +107 -0
- package/docs/documentation/customers/manage-customers.md +346 -0
- package/docs/documentation/customers/meta.json +5 -0
- package/docs/documentation/error-handling.md +239 -0
- package/docs/documentation/examples.md +37 -0
- package/docs/documentation/finance/acceptable-use.md +145 -0
- package/docs/documentation/finance/finance-overview.md +32 -0
- package/docs/documentation/finance/local-currency-taxes.md +40 -0
- package/docs/documentation/finance/merchant-of-record.md +48 -0
- package/docs/documentation/finance/meta.json +13 -0
- package/docs/documentation/finance/payouts-verification.md +186 -0
- package/docs/documentation/finance/payouts.md +41 -0
- package/docs/documentation/finance/supported-countries.md +28 -0
- package/docs/documentation/go/integrate-with-encore.md +229 -0
- package/docs/documentation/go/integrate-with-go.md +258 -0
- package/docs/documentation/go/meta.json +5 -0
- package/docs/documentation/introduction.md +58 -0
- package/docs/documentation/invoicing/handle-failed-payments.md +283 -0
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +73 -0
- package/docs/documentation/invoicing/manage-invoices.md +340 -0
- package/docs/documentation/invoicing/meta.json +9 -0
- package/docs/documentation/java/integrate-with-java.md +117 -0
- package/docs/documentation/java/meta.json +5 -0
- package/docs/documentation/meta.json +36 -0
- package/docs/documentation/nodejs/integrate-with-astro.md +129 -0
- package/docs/documentation/nodejs/integrate-with-bun.md +113 -0
- package/docs/documentation/nodejs/integrate-with-express.md +127 -0
- package/docs/documentation/nodejs/integrate-with-hono.md +141 -0
- package/docs/documentation/nodejs/integrate-with-nextjs.md +118 -0
- package/docs/documentation/nodejs/integrate-with-nuxt.md +125 -0
- package/docs/documentation/nodejs/integrate-with-remix.md +136 -0
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +127 -0
- package/docs/documentation/nodejs/meta.json +14 -0
- package/docs/documentation/payments/accept-one-time-payments.md +314 -0
- package/docs/documentation/payments/meta.json +10 -0
- package/docs/documentation/payments/payment-orchestration.md +43 -0
- package/docs/documentation/payments/payment-providers.md +59 -0
- package/docs/documentation/payments/transactions-refunds-and-retries.md +199 -0
- package/docs/documentation/php/integrate-with-laravel.md +222 -0
- package/docs/documentation/php/integrate-with-php.md +103 -0
- package/docs/documentation/php/integrate-with-symfony.md +214 -0
- package/docs/documentation/php/meta.json +9 -0
- package/docs/documentation/plans/add-ons.md +257 -0
- package/docs/documentation/plans/balance-and-top-ups.md +169 -0
- package/docs/documentation/plans/configure-features.md +335 -0
- package/docs/documentation/plans/consumption-models.md +93 -0
- package/docs/documentation/plans/create-plans.md +162 -0
- package/docs/documentation/plans/credit-packs.md +89 -0
- package/docs/documentation/plans/meta.json +14 -0
- package/docs/documentation/plans/one-time-payments.md +142 -0
- package/docs/documentation/plans/plan-groups.md +31 -0
- package/docs/documentation/platform/custom-domains.md +27 -0
- package/docs/documentation/platform/dashboard-metrics-and-events.md +25 -0
- package/docs/documentation/platform/members-and-permissions.md +21 -0
- package/docs/documentation/platform/meta.json +10 -0
- package/docs/documentation/platform/organization-settings.md +29 -0
- package/docs/documentation/python/integrate-with-django.md +161 -0
- package/docs/documentation/python/integrate-with-fastapi.md +164 -0
- package/docs/documentation/python/integrate-with-flask.md +153 -0
- package/docs/documentation/python/integrate-with-python.md +90 -0
- package/docs/documentation/python/meta.json +10 -0
- package/docs/documentation/sales/card-promotions.md +41 -0
- package/docs/documentation/sales/introductory-offers.md +64 -0
- package/docs/documentation/sales/meta.json +13 -0
- package/docs/documentation/sales/offers.md +65 -0
- package/docs/documentation/sales/promo-codes.md +65 -0
- package/docs/documentation/sales/promotional-offers.md +58 -0
- package/docs/documentation/sales/regional-prices.md +100 -0
- package/docs/documentation/sales/trial-periods.md +88 -0
- package/docs/documentation/sdk-reference.md +68 -0
- package/docs/documentation/subscriptions/manage-subscriptions.md +505 -0
- package/docs/documentation/subscriptions/meta.json +9 -0
- package/docs/documentation/subscriptions/plan-grants.md +132 -0
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +35 -0
- package/docs/documentation/testing-sandbox.md +251 -0
- package/docs/documentation/usage/ai-token-billing.md +294 -0
- package/docs/documentation/usage/meta.json +10 -0
- package/docs/documentation/usage/quota-management.md +341 -0
- package/docs/documentation/usage/seat-management.md +377 -0
- package/docs/documentation/usage/track-usage.md +282 -0
- package/docs/errors/addon_already_active.md +22 -0
- package/docs/errors/addon_has_activations.md +22 -0
- package/docs/errors/addon_not_active.md +22 -0
- package/docs/errors/addon_not_found.md +22 -0
- package/docs/errors/already_has_active_subscription.md +22 -0
- package/docs/errors/already_scheduled.md +22 -0
- package/docs/errors/api_key_not_found.md +22 -0
- package/docs/errors/card_promotions_not_available.md +22 -0
- package/docs/errors/charge_failed.md +22 -0
- package/docs/errors/charge_in_progress.md +22 -0
- package/docs/errors/claim_not_pending.md +22 -0
- package/docs/errors/credit_pack_not_found.md +22 -0
- package/docs/errors/customer_not_found.md +22 -0
- package/docs/errors/duplicate.md +22 -0
- package/docs/errors/endpoint_deprecated.md +22 -0
- package/docs/errors/endpoint_not_available.md +22 -0
- package/docs/errors/feature_already_exists.md +22 -0
- package/docs/errors/feature_disabled.md +22 -0
- package/docs/errors/feature_in_use.md +22 -0
- package/docs/errors/feature_not_found.md +22 -0
- package/docs/errors/feature_not_in_plan.md +22 -0
- package/docs/errors/forbidden.md +22 -0
- package/docs/errors/free_plan_change_not_supported.md +22 -0
- package/docs/errors/idempotency_in_progress.md +22 -0
- package/docs/errors/idempotency_key_mismatch.md +22 -0
- package/docs/errors/idempotency_unavailable.md +22 -0
- package/docs/errors/included_limit_reached.md +22 -0
- package/docs/errors/index.md +89 -0
- package/docs/errors/insufficient_balance.md +22 -0
- package/docs/errors/insufficient_credits.md +22 -0
- package/docs/errors/insufficient_seats.md +22 -0
- package/docs/errors/internal_error.md +22 -0
- package/docs/errors/invalid_json.md +22 -0
- package/docs/errors/invalid_subscription_status.md +22 -0
- package/docs/errors/invoice_not_found.md +22 -0
- package/docs/errors/market_group_in_use.md +22 -0
- package/docs/errors/market_group_not_found.md +22 -0
- package/docs/errors/market_in_use.md +22 -0
- package/docs/errors/market_not_found.md +22 -0
- package/docs/errors/missing_regional_price.md +22 -0
- package/docs/errors/model_not_found.md +22 -0
- package/docs/errors/no_active_subscription.md +22 -0
- package/docs/errors/no_change_requested.md +22 -0
- package/docs/errors/no_outstanding_invoice.md +22 -0
- package/docs/errors/no_payment_method.md +22 -0
- package/docs/errors/no_prices_configured.md +22 -0
- package/docs/errors/not_found.md +22 -0
- package/docs/errors/not_scheduled_for_cancellation.md +22 -0
- package/docs/errors/offer_not_applicable.md +22 -0
- package/docs/errors/offer_not_found.md +22 -0
- package/docs/errors/one_time_subscription_not_cancelable.md +22 -0
- package/docs/errors/organization_already_claimed.md +22 -0
- package/docs/errors/payment_failed.md +22 -0
- package/docs/errors/payment_method_not_found.md +22 -0
- package/docs/errors/payment_not_cancelable.md +22 -0
- package/docs/errors/payment_not_found.md +22 -0
- package/docs/errors/payouts_not_available_in_sandbox.md +22 -0
- package/docs/errors/plan_change_scheduled.md +22 -0
- package/docs/errors/plan_group_not_found.md +22 -0
- package/docs/errors/plan_not_found.md +22 -0
- package/docs/errors/plan_unavailable.md +22 -0
- package/docs/errors/plans_not_in_same_group.md +22 -0
- package/docs/errors/price_in_use.md +22 -0
- package/docs/errors/price_not_found.md +22 -0
- package/docs/errors/pricing_mode_mismatch.md +22 -0
- package/docs/errors/promo_code_expired.md +22 -0
- package/docs/errors/promo_code_not_found.md +22 -0
- package/docs/errors/provider_unsupported.md +22 -0
- package/docs/errors/rate_limited.md +22 -0
- package/docs/errors/sandbox_only.md +22 -0
- package/docs/errors/seat_limit_exceeded.md +22 -0
- package/docs/errors/subscription_activation_failed.md +22 -0
- package/docs/errors/subscription_already_canceled.md +22 -0
- package/docs/errors/subscription_cancel_failed.md +22 -0
- package/docs/errors/subscription_creation_failed.md +22 -0
- package/docs/errors/subscription_has_open_dispute.md +22 -0
- package/docs/errors/subscription_not_active.md +22 -0
- package/docs/errors/subscription_not_found.md +22 -0
- package/docs/errors/subscription_required.md +22 -0
- package/docs/errors/subscription_uncancel_failed.md +22 -0
- package/docs/errors/transaction_not_found.md +22 -0
- package/docs/errors/unauthorized.md +22 -0
- package/docs/errors/validation_error.md +22 -0
- package/docs/errors/webhook_not_found.md +22 -0
- package/docs/errors.md +34 -0
- package/docs/getting-started.md +35 -0
- package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +22 -0
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +20 -0
- package/docs/knowledge-base/how-do-discounts-work.md +65 -0
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +88 -0
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +77 -0
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +20 -0
- package/docs/knowledge-base/how-do-trial-periods-work.md +54 -0
- package/docs/knowledge-base/how-does-billing-work.md +73 -0
- package/docs/knowledge-base/how-does-payment-routing-work.md +17 -0
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +106 -0
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +88 -0
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +89 -0
- package/docs/knowledge-base/meta.json +29 -0
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +110 -0
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +40 -0
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +74 -0
- package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +21 -0
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +101 -0
- package/docs/manifest.json +1677 -0
- package/docs/meta.json +11 -0
- package/docs/platform-documentation.md +175 -0
- package/docs/schemas.md +995 -0
- package/docs/webhooks/addon-activated.md +44 -0
- package/docs/webhooks/addon-deactivated.md +40 -0
- package/docs/webhooks/balance-depleted.md +37 -0
- package/docs/webhooks/balance-low.md +39 -0
- package/docs/webhooks/balance-topped-up.md +41 -0
- package/docs/webhooks/checkout-ready.md +43 -0
- package/docs/webhooks/credits-depleted.md +35 -0
- package/docs/webhooks/credits-expired.md +35 -0
- package/docs/webhooks/credits-granted.md +37 -0
- package/docs/webhooks/credits-low.md +39 -0
- package/docs/webhooks/credits-purchased.md +41 -0
- package/docs/webhooks/customer-created.md +49 -0
- package/docs/webhooks/customer-state-changed.md +134 -0
- package/docs/webhooks/customer-updated.md +49 -0
- package/docs/webhooks/introduction.md +499 -0
- package/docs/webhooks/invoice-created.md +45 -0
- package/docs/webhooks/invoice-overdue.md +53 -0
- package/docs/webhooks/invoice-upcoming.md +43 -0
- package/docs/webhooks/invoice-voided.md +53 -0
- package/docs/webhooks/meta.json +78 -0
- package/docs/webhooks/payment-dispute-resolved.md +52 -0
- package/docs/webhooks/payment-disputed.md +49 -0
- package/docs/webhooks/payment-failed.md +37 -0
- package/docs/webhooks/payment-link-canceled.md +41 -0
- package/docs/webhooks/payment-link-completed.md +47 -0
- package/docs/webhooks/payment-link-created.md +41 -0
- package/docs/webhooks/payment-link-failed.md +45 -0
- package/docs/webhooks/payment-method-attached.md +40 -0
- package/docs/webhooks/payment-method-updated.md +38 -0
- package/docs/webhooks/payment-received.md +45 -0
- package/docs/webhooks/payment-recovered.md +39 -0
- package/docs/webhooks/payment-refunded.md +47 -0
- package/docs/webhooks/payment-retry-failed.md +39 -0
- package/docs/webhooks/payout-available.md +33 -0
- package/docs/webhooks/payout-created.md +48 -0
- package/docs/webhooks/payout-failed.md +52 -0
- package/docs/webhooks/payout-paid.md +48 -0
- package/docs/webhooks/quota-exceeded.md +44 -0
- package/docs/webhooks/quota-threshold-reached.md +41 -0
- package/docs/webhooks/seats-limit-reached.md +39 -0
- package/docs/webhooks/seats-updated.md +39 -0
- package/docs/webhooks/subscription-activated.md +43 -0
- package/docs/webhooks/subscription-canceled.md +57 -0
- package/docs/webhooks/subscription-cancellation-revoked.md +37 -0
- package/docs/webhooks/subscription-cancellation-scheduled.md +45 -0
- package/docs/webhooks/subscription-created.md +35 -0
- package/docs/webhooks/subscription-past-due.md +43 -0
- package/docs/webhooks/subscription-plan-change-revoked.md +50 -0
- package/docs/webhooks/subscription-plan-change-scheduled.md +55 -0
- package/docs/webhooks/subscription-plan-changed.md +43 -0
- package/docs/webhooks/subscription-reactivated.md +53 -0
- package/docs/webhooks/subscription-updated.md +39 -0
- package/docs/webhooks/trial-checkout-ready.md +39 -0
- package/docs/webhooks/trial-converted.md +39 -0
- package/docs/webhooks/trial-expired.md +39 -0
- package/docs/webhooks/trial-started.md +46 -0
- package/docs/webhooks/trial-will-end.md +41 -0
- package/docs/webhooks/usage-recorded.md +41 -0
- package/docs/webhooks.md +782 -0
- package/package.json +2 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-06-12
|
|
3
|
+
title: "invoice.voided"
|
|
4
|
+
description: "An invoice was voided and will not be collected."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `invoiceId` (string) — The invoice ID.
|
|
11
|
+
- `invoiceNumber` (string) — The human-readable invoice number.
|
|
12
|
+
- `invoiceStatus` (string) — Always "void" for this event.
|
|
13
|
+
- `periodStart` (string) — ISO 8601 start of the billing period.
|
|
14
|
+
- `periodEnd` (string) — ISO 8601 end of the billing period.
|
|
15
|
+
- `issueDate` (string) — ISO 8601 date the invoice was issued.
|
|
16
|
+
- `dueDate` (string) — ISO 8601 date the invoice was due.
|
|
17
|
+
- `currency` (string) — The invoice currency code.
|
|
18
|
+
- `subtotal` (number) — Subtotal in cents (100 = $1.00).
|
|
19
|
+
- `total` (number) — Total in cents (100 = $1.00).
|
|
20
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
21
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"event": "invoice.voided",
|
|
26
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
27
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
28
|
+
"mode": "live",
|
|
29
|
+
"apiVersion": "2026-07-31",
|
|
30
|
+
"data": {
|
|
31
|
+
"invoiceId": "inv_n4o5p6",
|
|
32
|
+
"invoiceNumber": "INV-0043",
|
|
33
|
+
"invoiceStatus": "void",
|
|
34
|
+
"periodStart": "2026-04-25T00:00:00.000Z",
|
|
35
|
+
"periodEnd": "2026-05-25T00:00:00.000Z",
|
|
36
|
+
"issueDate": "2026-04-25T00:00:00.000Z",
|
|
37
|
+
"dueDate": "2026-04-25T00:00:00.000Z",
|
|
38
|
+
"currency": "usd",
|
|
39
|
+
"subtotal": 9900,
|
|
40
|
+
"total": 9900,
|
|
41
|
+
"customerId": "user_123",
|
|
42
|
+
"subscriptionId": "sub_1a2b3c4d"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## When this fires
|
|
48
|
+
|
|
49
|
+
An invoice is voided when it is nullified before collection: an admin marks it void through the dashboard or the API, or Commet voids unpaid invoices automatically when their subscription is canceled. Voiding is terminal — a void invoice is never retried or collected.
|
|
50
|
+
|
|
51
|
+
The payload carries the same invoice resource shape as `invoice.created`, with `invoiceStatus` set to `"void"`.
|
|
52
|
+
|
|
53
|
+
Use this event to reverse anything you keyed off `invoice.created` for this invoice — pending dunning reminders, accounting entries, or in-app banners about an open invoice.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Webhooks",
|
|
3
|
+
"description": "Real-time event notifications for subscription, payment, and invoice changes",
|
|
4
|
+
"icon": "Plugs",
|
|
5
|
+
"root": true,
|
|
6
|
+
"pages": [
|
|
7
|
+
"introduction",
|
|
8
|
+
"---Subscription Events---",
|
|
9
|
+
"subscription-created",
|
|
10
|
+
"subscription-activated",
|
|
11
|
+
"subscription-reactivated",
|
|
12
|
+
"subscription-canceled",
|
|
13
|
+
"subscription-updated",
|
|
14
|
+
"subscription-plan-changed",
|
|
15
|
+
"subscription-cancellation-scheduled",
|
|
16
|
+
"subscription-cancellation-revoked",
|
|
17
|
+
"subscription-plan-change-scheduled",
|
|
18
|
+
"subscription-plan-change-revoked",
|
|
19
|
+
"subscription-past-due",
|
|
20
|
+
"---Trial Events---",
|
|
21
|
+
"trial-started",
|
|
22
|
+
"trial-converted",
|
|
23
|
+
"trial-expired",
|
|
24
|
+
"trial-will-end",
|
|
25
|
+
"trial-checkout-ready",
|
|
26
|
+
"---Checkout Events---",
|
|
27
|
+
"checkout-ready",
|
|
28
|
+
"---Payment Events---",
|
|
29
|
+
"payment-received",
|
|
30
|
+
"payment-failed",
|
|
31
|
+
"payment-recovered",
|
|
32
|
+
"payment-retry-failed",
|
|
33
|
+
"payment-refunded",
|
|
34
|
+
"payment-disputed",
|
|
35
|
+
"payment-dispute-resolved",
|
|
36
|
+
"---Payment Link Events---",
|
|
37
|
+
"payment-link-created",
|
|
38
|
+
"payment-link-completed",
|
|
39
|
+
"payment-link-failed",
|
|
40
|
+
"payment-link-canceled",
|
|
41
|
+
"---Invoice Events---",
|
|
42
|
+
"invoice-created",
|
|
43
|
+
"invoice-upcoming",
|
|
44
|
+
"invoice-overdue",
|
|
45
|
+
"invoice-voided",
|
|
46
|
+
"---Payment Method Events---",
|
|
47
|
+
"payment-method-attached",
|
|
48
|
+
"payment-method-updated",
|
|
49
|
+
"---Customer Events---",
|
|
50
|
+
"customer-created",
|
|
51
|
+
"customer-updated",
|
|
52
|
+
"customer-state-changed",
|
|
53
|
+
"---Credits & Balance Events---",
|
|
54
|
+
"credits-granted",
|
|
55
|
+
"credits-purchased",
|
|
56
|
+
"credits-low",
|
|
57
|
+
"credits-depleted",
|
|
58
|
+
"credits-expired",
|
|
59
|
+
"balance-topped-up",
|
|
60
|
+
"balance-low",
|
|
61
|
+
"balance-depleted",
|
|
62
|
+
"---Quota & Usage Events---",
|
|
63
|
+
"quota-threshold-reached",
|
|
64
|
+
"quota-exceeded",
|
|
65
|
+
"usage-recorded",
|
|
66
|
+
"---Seat Events---",
|
|
67
|
+
"seats-updated",
|
|
68
|
+
"seats-limit-reached",
|
|
69
|
+
"---Add-on Events---",
|
|
70
|
+
"addon-activated",
|
|
71
|
+
"addon-deactivated",
|
|
72
|
+
"---Payout Events---",
|
|
73
|
+
"payout-available",
|
|
74
|
+
"payout-created",
|
|
75
|
+
"payout-paid",
|
|
76
|
+
"payout-failed"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment.dispute_resolved"
|
|
4
|
+
description: "A payment dispute was resolved as won or lost."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentTransactionId` (string) — The disputed payment transaction ID.
|
|
11
|
+
- `provider` ("stripe" | "commet" | "dlocal") — The payment provider the charge was routed to: stripe, commet, or dlocal.
|
|
12
|
+
- `paymentLinkId` (string | null) — The payment link the payment originated from, or null when the payment did not come from a payment link.
|
|
13
|
+
- `invoiceId` (string | null) — The invoice the payment collected, or null for payments without an invoice.
|
|
14
|
+
- `invoiceNumber` (string | null) — The human-readable invoice number, if available.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, when the payment is linked to an invoice. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
17
|
+
- `disputeAmount` (number) — The contested amount in cents (100 = $1.00).
|
|
18
|
+
- `currency` (string) — The dispute currency code.
|
|
19
|
+
- `disputeReason` (string | null) — The provider's reason code, or null when none is given.
|
|
20
|
+
- `outcome` (string) — The resolution: "won" or "lost".
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"event": "payment.dispute_resolved",
|
|
25
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
26
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
27
|
+
"mode": "live",
|
|
28
|
+
"apiVersion": "2026-07-31",
|
|
29
|
+
"data": {
|
|
30
|
+
"paymentTransactionId": "txn_q7r8s9",
|
|
31
|
+
"provider": "stripe",
|
|
32
|
+
"paymentLinkId": "pay_l1m2n3",
|
|
33
|
+
"invoiceId": "inv_n4o5p6",
|
|
34
|
+
"invoiceNumber": "INV-0043",
|
|
35
|
+
"customerId": "user_123",
|
|
36
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
37
|
+
"disputeAmount": 9900,
|
|
38
|
+
"currency": "usd",
|
|
39
|
+
"disputeReason": "fraudulent",
|
|
40
|
+
"outcome": "won"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## When this fires
|
|
46
|
+
|
|
47
|
+
When the payment provider closes a dispute that previously fired `payment.disputed`. The payload carries the same identifiers plus the `outcome`:
|
|
48
|
+
|
|
49
|
+
- `won` — the dispute was resolved in your favor; the frozen amount is restored to your payout balance and the payment returns to succeeded.
|
|
50
|
+
- `lost` — the chargeback stands; the disputed amount stays deducted.
|
|
51
|
+
|
|
52
|
+
Use it to close the internal flag you opened on `payment.disputed`, and on `lost` to revoke whatever the original payment was funding.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment.disputed"
|
|
4
|
+
description: "A customer opened a dispute against a payment."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentTransactionId` (string) — The disputed payment transaction ID.
|
|
11
|
+
- `provider` ("stripe" | "commet" | "dlocal") — The payment provider the charge was routed to: stripe, commet, or dlocal.
|
|
12
|
+
- `paymentLinkId` (string | null) — The payment link the payment originated from, or null when the payment did not come from a payment link.
|
|
13
|
+
- `invoiceId` (string | null) — The invoice the payment collected, or null for payments without an invoice.
|
|
14
|
+
- `invoiceNumber` (string | null) — The human-readable invoice number, if available.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, when the payment is linked to an invoice. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
17
|
+
- `disputeAmount` (number) — The contested amount in cents (100 = $1.00).
|
|
18
|
+
- `currency` (string) — The dispute currency code.
|
|
19
|
+
- `disputeReason` (string | null) — The provider's reason code (e.g. fraudulent, product\_not\_received), or null when none is given.
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"event": "payment.disputed",
|
|
24
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
25
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
26
|
+
"mode": "live",
|
|
27
|
+
"apiVersion": "2026-07-31",
|
|
28
|
+
"data": {
|
|
29
|
+
"paymentTransactionId": "txn_q7r8s9",
|
|
30
|
+
"provider": "stripe",
|
|
31
|
+
"paymentLinkId": null,
|
|
32
|
+
"invoiceId": "inv_n4o5p6",
|
|
33
|
+
"invoiceNumber": "INV-0043",
|
|
34
|
+
"customerId": "user_123",
|
|
35
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
36
|
+
"disputeAmount": 9900,
|
|
37
|
+
"currency": "usd",
|
|
38
|
+
"disputeReason": "fraudulent"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## When this fires
|
|
44
|
+
|
|
45
|
+
When the cardholder's bank notifies the payment provider that a charge is being disputed (a chargeback). The disputed amount is frozen from your payout balance while the dispute is open. As the Merchant of Record, Commet handles the evidence and resolution process with the provider.
|
|
46
|
+
|
|
47
|
+
`disputeAmount` is the contested amount in cents; `disputeReason` is the provider's reason code (for example `fraudulent` or `product_not_received`), or `null` when the provider gives none.
|
|
48
|
+
|
|
49
|
+
The resolution fires `payment.dispute_resolved` with the outcome. Use this event to flag the account internally — repeated disputes are a strong fraud signal.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment.failed"
|
|
4
|
+
description: "Fired when a recurring charge fails"
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `invoiceId` (string) — The invoice ID, if available.
|
|
11
|
+
- `invoiceNumber` (string) — The human-readable invoice number, if available.
|
|
12
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
13
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
14
|
+
- `provider` ("stripe" | "commet" | "dlocal") — The payment provider the charge was routed to: stripe, commet, or dlocal.
|
|
15
|
+
- `failureCode` (string) — The failure code from the payment processor.
|
|
16
|
+
- `failureMessage` (string) — A human-readable failure message.
|
|
17
|
+
- `recoveryUrl` (string | null) — A ready-to-use link the customer can follow to retry this payment, or null when no recovery path applies. For a first failed charge (pending\_payment) it is the checkout URL; for a failed renewal (past\_due) it is a signed recovery link — no separate createRecoveryLink call needed.
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"event": "payment.failed",
|
|
22
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
23
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
24
|
+
"mode": "live",
|
|
25
|
+
"apiVersion": "2026-07-31",
|
|
26
|
+
"data": {
|
|
27
|
+
"invoiceId": "inv_n4o5p6",
|
|
28
|
+
"invoiceNumber": "INV-0043",
|
|
29
|
+
"customerId": "user_123",
|
|
30
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
31
|
+
"provider": "stripe",
|
|
32
|
+
"failureCode": "card_declined",
|
|
33
|
+
"failureMessage": "Your card was declined.",
|
|
34
|
+
"recoveryUrl": "https://pay.commet.co/recover/tok_9f8e7d6c"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment_link.canceled"
|
|
4
|
+
description: "A payment link was canceled before being paid."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentId` (string) — The payment link ID.
|
|
11
|
+
- `status` (string) — The link status. Always "canceled" for this event.
|
|
12
|
+
- `amount` (number) — The total amount of the canceled link in cents (100 = $1.00).
|
|
13
|
+
- `currency` (string) — The payment currency code.
|
|
14
|
+
- `description` (string) — The payment description shown to the customer.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, or null when the link is not tied to a customer. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"event": "payment_link.canceled",
|
|
20
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
21
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
22
|
+
"mode": "live",
|
|
23
|
+
"apiVersion": "2026-07-31",
|
|
24
|
+
"data": {
|
|
25
|
+
"paymentId": "pay_l1m2n3",
|
|
26
|
+
"status": "canceled",
|
|
27
|
+
"amount": 5000,
|
|
28
|
+
"currency": "usd",
|
|
29
|
+
"description": "One-time onboarding fee",
|
|
30
|
+
"customerId": "user_123"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## When this fires
|
|
36
|
+
|
|
37
|
+
When a pending [payment link](/docs/accept-one-time-payments) is canceled before the customer pays it. A canceled link can no longer be paid.
|
|
38
|
+
|
|
39
|
+
Payment links never expire on their own — there is no expiry event. A link stays payable until it is paid or explicitly canceled.
|
|
40
|
+
|
|
41
|
+
The event fires the same way regardless of which payment provider processes the charge.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment_link.completed"
|
|
4
|
+
description: "A payment link was paid successfully."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentId` (string) — The payment link ID.
|
|
11
|
+
- `status` (string) — The link status. Always "succeeded" for this event.
|
|
12
|
+
- `amount` (number) — The collected amount in cents (100 = $1.00).
|
|
13
|
+
- `currency` (string) — The payment currency code.
|
|
14
|
+
- `description` (string) — The payment description shown to the customer.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, or null when the link is not tied to a customer. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
- `invoiceId` (string) — The one-time invoice generated for this payment.
|
|
17
|
+
- `invoiceNumber` (string) — The human-readable invoice number.
|
|
18
|
+
- `paymentTransactionId` (string | null) — The payment transaction ID for the settled charge.
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"event": "payment_link.completed",
|
|
23
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
24
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
25
|
+
"mode": "live",
|
|
26
|
+
"apiVersion": "2026-07-31",
|
|
27
|
+
"data": {
|
|
28
|
+
"paymentId": "pay_l1m2n3",
|
|
29
|
+
"status": "succeeded",
|
|
30
|
+
"amount": 5000,
|
|
31
|
+
"currency": "usd",
|
|
32
|
+
"description": "One-time onboarding fee",
|
|
33
|
+
"customerId": "user_123",
|
|
34
|
+
"invoiceId": "inv_n4o5p6",
|
|
35
|
+
"invoiceNumber": "INV-0044",
|
|
36
|
+
"paymentTransactionId": "txn_q7r8s9"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## When this fires
|
|
42
|
+
|
|
43
|
+
When a customer pays a [payment link](/docs/accept-one-time-payments) on the hosted pay page and the charge settles. Commet generates a one-time invoice (`invoiceType: "one_time_payment"`) and a payment transaction at the same time; the payload carries the `invoiceId` and `paymentTransactionId`.
|
|
44
|
+
|
|
45
|
+
This is the event to fulfill the purchase on — the money has been collected.
|
|
46
|
+
|
|
47
|
+
The event fires the same way regardless of which payment provider processes the charge.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment_link.created"
|
|
4
|
+
description: "A payment link was created and is ready to be paid."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentId` (string) — The payment link ID.
|
|
11
|
+
- `status` (string) — The link status. Always "pending" for this event.
|
|
12
|
+
- `amount` (number) — The total amount to collect in cents (100 = $1.00).
|
|
13
|
+
- `currency` (string) — The payment currency code.
|
|
14
|
+
- `description` (string) — The payment description shown to the customer.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, or null when the link is not tied to a customer. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"event": "payment_link.created",
|
|
20
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
21
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
22
|
+
"mode": "live",
|
|
23
|
+
"apiVersion": "2026-07-31",
|
|
24
|
+
"data": {
|
|
25
|
+
"paymentId": "pay_l1m2n3",
|
|
26
|
+
"status": "pending",
|
|
27
|
+
"amount": 5000,
|
|
28
|
+
"currency": "usd",
|
|
29
|
+
"description": "One-time onboarding fee",
|
|
30
|
+
"customerId": "user_123"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## When this fires
|
|
36
|
+
|
|
37
|
+
When a payment link is created with [Commet Pay](/docs/accept-one-time-payments). A payment link is a one-time, customer-present charge — there's no subscription and no plan behind it. The link is `pending`: the customer has not paid yet.
|
|
38
|
+
|
|
39
|
+
Do not fulfill the purchase on this event. Wait for `payment_link.completed`.
|
|
40
|
+
|
|
41
|
+
The event fires the same way regardless of which payment provider processes the charge.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment_link.failed"
|
|
4
|
+
description: "A payment link charge attempt failed."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentId` (string) — The payment link ID.
|
|
11
|
+
- `status` (string) — The link status. Always "failed" for this event.
|
|
12
|
+
- `amount` (number) — The amount that was attempted in cents (100 = $1.00).
|
|
13
|
+
- `currency` (string) — The payment currency code.
|
|
14
|
+
- `description` (string) — The payment description shown to the customer.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, or null when the link is not tied to a customer. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
- `failureCode` (string) — The failure code from the payment processor.
|
|
17
|
+
- `failureMessage` (string) — A human-readable failure message.
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"event": "payment_link.failed",
|
|
22
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
23
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
24
|
+
"mode": "live",
|
|
25
|
+
"apiVersion": "2026-07-31",
|
|
26
|
+
"data": {
|
|
27
|
+
"paymentId": "pay_l1m2n3",
|
|
28
|
+
"status": "failed",
|
|
29
|
+
"amount": 5000,
|
|
30
|
+
"currency": "usd",
|
|
31
|
+
"description": "One-time onboarding fee",
|
|
32
|
+
"customerId": "user_123",
|
|
33
|
+
"failureCode": "card_declined",
|
|
34
|
+
"failureMessage": "Your card was declined."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## When this fires
|
|
40
|
+
|
|
41
|
+
When a charge attempt on a [payment link](/docs/accept-one-time-payments) is declined. The link stays open — a failed link is retryable, and the customer can pay it again. A later successful attempt fires `payment_link.completed`.
|
|
42
|
+
|
|
43
|
+
`failureCode` is the processor's code (for example `card_declined`) and `failureMessage` is the human-readable reason, or `null` when the provider gives none.
|
|
44
|
+
|
|
45
|
+
The event fires the same way regardless of which payment provider processes the charge.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-06-12
|
|
3
|
+
title: "payment_method.attached"
|
|
4
|
+
description: "A payment method was saved for a customer's subscription."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `subscriptionId` (string) — The subscription the payment method was saved for.
|
|
11
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
12
|
+
- `card` (WebhookCardInfo | null) — Card display metadata: brand, last4, expMonth, expYear. Null when the method is not a card or its details cannot be retrieved.
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"event": "payment_method.attached",
|
|
17
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
18
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
19
|
+
"mode": "live",
|
|
20
|
+
"apiVersion": "2026-07-31",
|
|
21
|
+
"data": {
|
|
22
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
23
|
+
"customerId": "user_123",
|
|
24
|
+
"card": {
|
|
25
|
+
"brand": "visa",
|
|
26
|
+
"last4": "4242",
|
|
27
|
+
"expMonth": 12,
|
|
28
|
+
"expYear": 2030
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## When this fires
|
|
35
|
+
|
|
36
|
+
Fired when Commet records a payment method for a subscription: after a paid checkout, when a trial starts with a card on file, or when a zero-total checkout completes with a saved payment method.
|
|
37
|
+
|
|
38
|
+
The `card` object carries display metadata only — brand, last 4 digits, and expiration. Full card numbers never leave the payment provider. When the saved method is not a card or its details cannot be retrieved, `card` is `null`.
|
|
39
|
+
|
|
40
|
+
Use it to show the saved card in your own billing UI or confirm to the customer that their payment method is on file.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-06-12
|
|
3
|
+
title: "payment_method.updated"
|
|
4
|
+
description: "A customer's default payment method was replaced."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
11
|
+
- `card` (WebhookCardInfo | null) — Card display metadata for the new method: brand, last4, expMonth, expYear. Null when the method is not a card or its details cannot be retrieved.
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"event": "payment_method.updated",
|
|
16
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
17
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
18
|
+
"mode": "live",
|
|
19
|
+
"apiVersion": "2026-07-31",
|
|
20
|
+
"data": {
|
|
21
|
+
"customerId": "user_123",
|
|
22
|
+
"card": {
|
|
23
|
+
"brand": "mastercard",
|
|
24
|
+
"last4": "5100",
|
|
25
|
+
"expMonth": 8,
|
|
26
|
+
"expYear": 2031
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## When this fires
|
|
33
|
+
|
|
34
|
+
Fired when a customer replaces their default payment method through the customer portal. The new method applies to all of the customer's subscriptions.
|
|
35
|
+
|
|
36
|
+
The `card` object carries display metadata only — brand, last 4 digits, and expiration. Full card numbers never leave the payment provider. When the new method is not a card or its details cannot be retrieved, `card` is `null`.
|
|
37
|
+
|
|
38
|
+
Use it to refresh the card shown in your billing UI. A payment method update is also a strong recovery signal for past-due subscriptions — the customer typically updates their card to fix a failed payment.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment.received"
|
|
4
|
+
description: "Fired every time a payment settles successfully — the first payment and every renewal alike"
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `invoiceId` (string) — The invoice ID.
|
|
11
|
+
- `invoiceNumber` (string) — The human-readable invoice number.
|
|
12
|
+
- `invoiceTotal` (number) — Invoice total in cents (100 = $1.00).
|
|
13
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
14
|
+
- `subscriptionId` (string | null) — The subscription ID.
|
|
15
|
+
- `paymentTransactionId` (string | null) — The payment transaction ID.
|
|
16
|
+
- `provider` ("stripe" | "commet" | "dlocal" | null) — The payment provider the charge was routed to: stripe, commet, or dlocal. Null for billing-only charges with no Commet ledger row.
|
|
17
|
+
- `grossAmount` (number | null) — Gross amount in cents before fees.
|
|
18
|
+
- `currency` (string | null) — The payment currency code.
|
|
19
|
+
- `orgNetAmount` (number | null) — Net amount after fees in cents.
|
|
20
|
+
- `customerEmail` (string | null) — The customer email used for this payment.
|
|
21
|
+
- `paidAt` (string, optional) — ISO 8601 datetime when the payment was received.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"event": "payment.received",
|
|
26
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
27
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
28
|
+
"mode": "live",
|
|
29
|
+
"apiVersion": "2026-07-31",
|
|
30
|
+
"data": {
|
|
31
|
+
"invoiceId": "inv_n4o5p6",
|
|
32
|
+
"invoiceNumber": "INV-0043",
|
|
33
|
+
"invoiceTotal": 9900,
|
|
34
|
+
"customerId": "user_123",
|
|
35
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
36
|
+
"paymentTransactionId": "txn_q7r8s9",
|
|
37
|
+
"provider": "stripe",
|
|
38
|
+
"grossAmount": 9900,
|
|
39
|
+
"currency": "usd",
|
|
40
|
+
"orgNetAmount": 9200,
|
|
41
|
+
"customerEmail": "billing@acme.com",
|
|
42
|
+
"paidAt": "2026-04-25T00:05:00.000Z"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-06-12
|
|
3
|
+
title: "payment.recovered"
|
|
4
|
+
description: "A previously failed payment was recovered."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `invoiceId` (string) — The recovered invoice ID.
|
|
11
|
+
- `invoiceNumber` (string) — The human-readable invoice number.
|
|
12
|
+
- `invoiceTotal` (number) — Invoice total in cents (100 = $1.00).
|
|
13
|
+
- `customerId` (string) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
14
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
15
|
+
- `provider` ("stripe" | "commet" | "dlocal" | null) — The payment provider that recovered the payment, or null when the invoice was recovered without a processor charge.
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"event": "payment.recovered",
|
|
20
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
21
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
22
|
+
"mode": "live",
|
|
23
|
+
"apiVersion": "2026-07-31",
|
|
24
|
+
"data": {
|
|
25
|
+
"invoiceId": "inv_n4o5p6",
|
|
26
|
+
"invoiceNumber": "INV-0043",
|
|
27
|
+
"invoiceTotal": 9900,
|
|
28
|
+
"customerId": "user_123",
|
|
29
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
30
|
+
"provider": "stripe"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## When this fires
|
|
36
|
+
|
|
37
|
+
After a payment failure put a subscription in `past_due`, a successful retry of the outstanding invoice fires this event — whether the charge succeeded automatically or the customer paid through the portal after updating their card.
|
|
38
|
+
|
|
39
|
+
The subscription returns to `active` at the same time, so `customer.state_changed` also fires. Restore access on either event; use this one specifically to close dunning flows you opened on `payment.failed`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
lastModified: 2026-07-10
|
|
3
|
+
title: "payment.refunded"
|
|
4
|
+
description: "A payment was refunded to the customer."
|
|
5
|
+
full: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
All webhook payloads follow a consistent top-level structure with event-specific data nested within the `data` object.
|
|
9
|
+
|
|
10
|
+
- `paymentTransactionId` (string) — The refunded payment transaction ID.
|
|
11
|
+
- `provider` ("stripe" | "commet" | "dlocal") — The payment provider the charge was routed to: stripe, commet, or dlocal.
|
|
12
|
+
- `paymentLinkId` (string | null) — The payment link the payment originated from, or null when the payment did not come from a payment link.
|
|
13
|
+
- `invoiceId` (string | null) — The invoice the payment collected, or null for payments without an invoice.
|
|
14
|
+
- `invoiceNumber` (string | null) — The human-readable invoice number, if available.
|
|
15
|
+
- `customerId` (string | null) — The customer ID, when the payment is linked to an invoice. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
|
|
16
|
+
- `subscriptionId` (string | null) — The subscription ID, if the invoice is linked to a subscription.
|
|
17
|
+
- `refundAmount` (number) — The refunded amount in cents (100 = $1.00).
|
|
18
|
+
- `currency` (string) — The refund currency code.
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"event": "payment.refunded",
|
|
23
|
+
"timestamp": "2026-06-23T14:30:00.000Z",
|
|
24
|
+
"organizationId": "8f14e45f-ceea-4e7a-9c3d-1c2b3a4d5e6f",
|
|
25
|
+
"mode": "live",
|
|
26
|
+
"apiVersion": "2026-07-31",
|
|
27
|
+
"data": {
|
|
28
|
+
"paymentTransactionId": "txn_q7r8s9",
|
|
29
|
+
"provider": "stripe",
|
|
30
|
+
"paymentLinkId": null,
|
|
31
|
+
"invoiceId": "inv_n4o5p6",
|
|
32
|
+
"invoiceNumber": "INV-0043",
|
|
33
|
+
"customerId": "user_123",
|
|
34
|
+
"subscriptionId": "sub_1a2b3c4d",
|
|
35
|
+
"refundAmount": 9900,
|
|
36
|
+
"currency": "usd"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## When this fires
|
|
42
|
+
|
|
43
|
+
When a refund is issued for a payment — full or partial — and the payment provider confirms it. A full refund of a subscription invoice also cancels the subscription immediately (`subscription.canceled` fires with reason `refund`); a partial refund leaves the subscription untouched.
|
|
44
|
+
|
|
45
|
+
`refundAmount` is the refunded amount in cents (100 = $1.00). The invoice fields are `null` for payments that were not tied to an invoice.
|
|
46
|
+
|
|
47
|
+
Use it to mirror the refund in your own books or to notify the customer through your channels.
|