@fantastic.dev/better-stripe 0.4.0-bootstrap.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/CHANGELOG.md +318 -0
- package/README.md +1117 -0
- package/dist/client/billing/checkout.d.ts +75 -0
- package/dist/client/billing/checkout.d.ts.map +1 -0
- package/dist/client/billing/checkout.js +260 -0
- package/dist/client/billing/checkout.js.map +1 -0
- package/dist/client/billing/invoices.d.ts +37 -0
- package/dist/client/billing/invoices.d.ts.map +1 -0
- package/dist/client/billing/invoices.js +29 -0
- package/dist/client/billing/invoices.js.map +1 -0
- package/dist/client/billing/subscriptions.d.ts +179 -0
- package/dist/client/billing/subscriptions.d.ts.map +1 -0
- package/dist/client/billing/subscriptions.js +346 -0
- package/dist/client/billing/subscriptions.js.map +1 -0
- package/dist/client/connect/disputes.d.ts +112 -0
- package/dist/client/connect/disputes.d.ts.map +1 -0
- package/dist/client/connect/disputes.js +186 -0
- package/dist/client/connect/disputes.js.map +1 -0
- package/dist/client/connect/paymentMethodUtils.d.ts +17 -0
- package/dist/client/connect/paymentMethodUtils.d.ts.map +1 -0
- package/dist/client/connect/paymentMethodUtils.js +24 -0
- package/dist/client/connect/paymentMethodUtils.js.map +1 -0
- package/dist/client/connect/paymentMethods.d.ts +23 -0
- package/dist/client/connect/paymentMethods.d.ts.map +1 -0
- package/dist/client/connect/paymentMethods.js +27 -0
- package/dist/client/connect/paymentMethods.js.map +1 -0
- package/dist/client/connect/payouts.d.ts +47 -0
- package/dist/client/connect/payouts.d.ts.map +1 -0
- package/dist/client/connect/payouts.js +52 -0
- package/dist/client/connect/payouts.js.map +1 -0
- package/dist/client/connect/refundActor.d.ts +50 -0
- package/dist/client/connect/refundActor.d.ts.map +1 -0
- package/dist/client/connect/refundActor.js +17 -0
- package/dist/client/connect/refundActor.js.map +1 -0
- package/dist/client/connect/refunds.d.ts +75 -0
- package/dist/client/connect/refunds.d.ts.map +1 -0
- package/dist/client/connect/refunds.js +141 -0
- package/dist/client/connect/refunds.js.map +1 -0
- package/dist/client/connect/transfers.d.ts +189 -0
- package/dist/client/connect/transfers.d.ts.map +1 -0
- package/dist/client/connect/transfers.js +347 -0
- package/dist/client/connect/transfers.js.map +1 -0
- package/dist/client/constants.d.ts +15 -0
- package/dist/client/constants.d.ts.map +1 -0
- package/dist/client/constants.js +14 -0
- package/dist/client/constants.js.map +1 -0
- package/dist/client/core/accountLinks.d.ts +68 -0
- package/dist/client/core/accountLinks.d.ts.map +1 -0
- package/dist/client/core/accountLinks.js +131 -0
- package/dist/client/core/accountLinks.js.map +1 -0
- package/dist/client/core/accountStatus.d.ts +12 -0
- package/dist/client/core/accountStatus.d.ts.map +1 -0
- package/dist/client/core/accountStatus.js +56 -0
- package/dist/client/core/accountStatus.js.map +1 -0
- package/dist/client/core/accounts.d.ts +181 -0
- package/dist/client/core/accounts.d.ts.map +1 -0
- package/dist/client/core/accounts.js +359 -0
- package/dist/client/core/accounts.js.map +1 -0
- package/dist/client/core/config.d.ts +5 -0
- package/dist/client/core/config.d.ts.map +1 -0
- package/dist/client/core/config.js +11 -0
- package/dist/client/core/config.js.map +1 -0
- package/dist/client/core/descriptors.d.ts +24 -0
- package/dist/client/core/descriptors.d.ts.map +1 -0
- package/dist/client/core/descriptors.js +43 -0
- package/dist/client/core/descriptors.js.map +1 -0
- package/dist/client/core/fees.d.ts +83 -0
- package/dist/client/core/fees.d.ts.map +1 -0
- package/dist/client/core/fees.js +178 -0
- package/dist/client/core/fees.js.map +1 -0
- package/dist/client/errors.d.ts +20 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +31 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/helpers.d.ts +20 -0
- package/dist/client/helpers.d.ts.map +1 -0
- package/dist/client/helpers.js +46 -0
- package/dist/client/helpers.js.map +1 -0
- package/dist/client/index.d.ts +880 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +791 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/products/prices.d.ts +61 -0
- package/dist/client/products/prices.d.ts.map +1 -0
- package/dist/client/products/prices.js +92 -0
- package/dist/client/products/prices.js.map +1 -0
- package/dist/client/products/products.d.ts +65 -0
- package/dist/client/products/products.d.ts.map +1 -0
- package/dist/client/products/products.js +186 -0
- package/dist/client/products/products.js.map +1 -0
- package/dist/client/stripe-types.d.ts +44 -0
- package/dist/client/stripe-types.d.ts.map +1 -0
- package/dist/client/stripe-types.js +2 -0
- package/dist/client/stripe-types.js.map +1 -0
- package/dist/client/types/documents.d.ts +195 -0
- package/dist/client/types/documents.d.ts.map +1 -0
- package/dist/client/types/documents.js +2 -0
- package/dist/client/types/documents.js.map +1 -0
- package/dist/client/types/events.d.ts +43 -0
- package/dist/client/types/events.d.ts.map +1 -0
- package/dist/client/types/events.js +2 -0
- package/dist/client/types/events.js.map +1 -0
- package/dist/client/types/index.d.ts +5 -0
- package/dist/client/types/index.d.ts.map +1 -0
- package/dist/client/types/index.js +2 -0
- package/dist/client/types/index.js.map +1 -0
- package/dist/client/types/options.d.ts +79 -0
- package/dist/client/types/options.d.ts.map +1 -0
- package/dist/client/types/options.js +2 -0
- package/dist/client/types/options.js.map +1 -0
- package/dist/client/types/triggers.d.ts +101 -0
- package/dist/client/types/triggers.d.ts.map +1 -0
- package/dist/client/types/triggers.js +2 -0
- package/dist/client/types/triggers.js.map +1 -0
- package/dist/client/types.d.ts +2 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/client/utils/data.d.ts +10 -0
- package/dist/client/utils/data.d.ts.map +1 -0
- package/dist/client/utils/data.js +13 -0
- package/dist/client/utils/data.js.map +1 -0
- package/dist/client/utils/owner.d.ts +22 -0
- package/dist/client/utils/owner.d.ts.map +1 -0
- package/dist/client/utils/owner.js +20 -0
- package/dist/client/utils/owner.js.map +1 -0
- package/dist/client/utils/stripeDashboardUrl.d.ts +12 -0
- package/dist/client/utils/stripeDashboardUrl.d.ts.map +1 -0
- package/dist/client/utils/stripeDashboardUrl.js +39 -0
- package/dist/client/utils/stripeDashboardUrl.js.map +1 -0
- package/dist/client/utils/webhookEndpoints.d.ts +83 -0
- package/dist/client/utils/webhookEndpoints.d.ts.map +1 -0
- package/dist/client/utils/webhookEndpoints.js +185 -0
- package/dist/client/utils/webhookEndpoints.js.map +1 -0
- package/dist/client/webhooks/handler.d.ts +4 -0
- package/dist/client/webhooks/handler.d.ts.map +1 -0
- package/dist/client/webhooks/handler.js +170 -0
- package/dist/client/webhooks/handler.js.map +1 -0
- package/dist/client/webhooks/helpers.d.ts +56 -0
- package/dist/client/webhooks/helpers.d.ts.map +1 -0
- package/dist/client/webhooks/helpers.js +229 -0
- package/dist/client/webhooks/helpers.js.map +1 -0
- package/dist/client/webhooks/hooks.d.ts +11 -0
- package/dist/client/webhooks/hooks.d.ts.map +1 -0
- package/dist/client/webhooks/hooks.js +134 -0
- package/dist/client/webhooks/hooks.js.map +1 -0
- package/dist/client/webhooks/index.d.ts +23 -0
- package/dist/client/webhooks/index.d.ts.map +1 -0
- package/dist/client/webhooks/index.js +35 -0
- package/dist/client/webhooks/index.js.map +1 -0
- package/dist/client/webhooks/processors.d.ts +4 -0
- package/dist/client/webhooks/processors.d.ts.map +1 -0
- package/dist/client/webhooks/processors.js +932 -0
- package/dist/client/webhooks/processors.js.map +1 -0
- package/dist/client/webhooks/v2.d.ts +11 -0
- package/dist/client/webhooks/v2.d.ts.map +1 -0
- package/dist/client/webhooks/v2.js +94 -0
- package/dist/client/webhooks/v2.js.map +1 -0
- package/dist/client/webhooks.d.ts +2 -0
- package/dist/client/webhooks.d.ts.map +1 -0
- package/dist/client/webhooks.js +4 -0
- package/dist/client/webhooks.js.map +1 -0
- package/dist/component/_generated/component.d.ts +1262 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +129 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +79 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/billing/mutations.d.ts +86 -0
- package/dist/component/billing/mutations.d.ts.map +1 -0
- package/dist/component/billing/mutations.js +131 -0
- package/dist/component/billing/mutations.js.map +1 -0
- package/dist/component/billing/queries.d.ts +425 -0
- package/dist/component/billing/queries.d.ts.map +1 -0
- package/dist/component/billing/queries.js +304 -0
- package/dist/component/billing/queries.js.map +1 -0
- package/dist/component/billing/schema.d.ts +228 -0
- package/dist/component/billing/schema.d.ts.map +1 -0
- package/dist/component/billing/schema.js +33 -0
- package/dist/component/billing/schema.js.map +1 -0
- package/dist/component/billing/validators.d.ts +364 -0
- package/dist/component/billing/validators.d.ts.map +1 -0
- package/dist/component/billing/validators.js +98 -0
- package/dist/component/billing/validators.js.map +1 -0
- package/dist/component/connect/mutations.d.ts +182 -0
- package/dist/component/connect/mutations.d.ts.map +1 -0
- package/dist/component/connect/mutations.js +480 -0
- package/dist/component/connect/mutations.js.map +1 -0
- package/dist/component/connect/queries.d.ts +347 -0
- package/dist/component/connect/queries.d.ts.map +1 -0
- package/dist/component/connect/queries.js +449 -0
- package/dist/component/connect/queries.js.map +1 -0
- package/dist/component/connect/schema.d.ts +258 -0
- package/dist/component/connect/schema.d.ts.map +1 -0
- package/dist/component/connect/schema.js +70 -0
- package/dist/component/connect/schema.js.map +1 -0
- package/dist/component/connect/validators.d.ts +468 -0
- package/dist/component/connect/validators.d.ts.map +1 -0
- package/dist/component/connect/validators.js +250 -0
- package/dist/component/connect/validators.js.map +1 -0
- package/dist/component/convex.config.d.ts +5 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +17 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/core/mutations.d.ts +52 -0
- package/dist/component/core/mutations.d.ts.map +1 -0
- package/dist/component/core/mutations.js +153 -0
- package/dist/component/core/mutations.js.map +1 -0
- package/dist/component/core/queries.d.ts +95 -0
- package/dist/component/core/queries.d.ts.map +1 -0
- package/dist/component/core/queries.js +86 -0
- package/dist/component/core/queries.js.map +1 -0
- package/dist/component/core/schema.d.ts +41 -0
- package/dist/component/core/schema.d.ts.map +1 -0
- package/dist/component/core/schema.js +12 -0
- package/dist/component/core/schema.js.map +1 -0
- package/dist/component/core/validators.d.ts +65 -0
- package/dist/component/core/validators.d.ts.map +1 -0
- package/dist/component/core/validators.js +35 -0
- package/dist/component/core/validators.js.map +1 -0
- package/dist/component/lib/fees.d.ts +74 -0
- package/dist/component/lib/fees.d.ts.map +1 -0
- package/dist/component/lib/fees.js +51 -0
- package/dist/component/lib/fees.js.map +1 -0
- package/dist/component/lib/idempotency.d.ts +9 -0
- package/dist/component/lib/idempotency.d.ts.map +1 -0
- package/dist/component/lib/idempotency.js +18 -0
- package/dist/component/lib/idempotency.js.map +1 -0
- package/dist/component/lib/reversals.d.ts +48 -0
- package/dist/component/lib/reversals.d.ts.map +1 -0
- package/dist/component/lib/reversals.js +79 -0
- package/dist/component/lib/reversals.js.map +1 -0
- package/dist/component/lib/stripeFactory.d.ts +7 -0
- package/dist/component/lib/stripeFactory.d.ts.map +1 -0
- package/dist/component/lib/stripeFactory.js +28 -0
- package/dist/component/lib/stripeFactory.js.map +1 -0
- package/dist/component/products/mutations.d.ts +22 -0
- package/dist/component/products/mutations.d.ts.map +1 -0
- package/dist/component/products/mutations.js +63 -0
- package/dist/component/products/mutations.js.map +1 -0
- package/dist/component/products/queries.d.ts +109 -0
- package/dist/component/products/queries.d.ts.map +1 -0
- package/dist/component/products/queries.js +122 -0
- package/dist/component/products/queries.js.map +1 -0
- package/dist/component/products/schema.d.ts +58 -0
- package/dist/component/products/schema.d.ts.map +1 -0
- package/dist/component/products/schema.js +20 -0
- package/dist/component/products/schema.js.map +1 -0
- package/dist/component/products/validators.d.ts +86 -0
- package/dist/component/products/validators.d.ts.map +1 -0
- package/dist/component/products/validators.js +47 -0
- package/dist/component/products/validators.js.map +1 -0
- package/dist/component/schema.d.ts +555 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +28 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/webhooks/mutations.d.ts +30 -0
- package/dist/component/webhooks/mutations.d.ts.map +1 -0
- package/dist/component/webhooks/mutations.js +124 -0
- package/dist/component/webhooks/mutations.js.map +1 -0
- package/dist/component/webhooks/queries.d.ts +35 -0
- package/dist/component/webhooks/queries.d.ts.map +1 -0
- package/dist/component/webhooks/queries.js +41 -0
- package/dist/component/webhooks/queries.js.map +1 -0
- package/dist/component/webhooks/schema.d.ts +22 -0
- package/dist/component/webhooks/schema.d.ts.map +1 -0
- package/dist/component/webhooks/schema.js +9 -0
- package/dist/component/webhooks/schema.js.map +1 -0
- package/dist/component/webhooks/validators.d.ts +37 -0
- package/dist/component/webhooks/validators.d.ts.map +1 -0
- package/dist/component/webhooks/validators.js +22 -0
- package/dist/component/webhooks/validators.js.map +1 -0
- package/dist/react/components/AccountCloseButton.d.ts +42 -0
- package/dist/react/components/AccountCloseButton.d.ts.map +1 -0
- package/dist/react/components/AccountCloseButton.js +33 -0
- package/dist/react/components/AccountCloseButton.js.map +1 -0
- package/dist/react/components/AccountCloseCard.d.ts +31 -0
- package/dist/react/components/AccountCloseCard.d.ts.map +1 -0
- package/dist/react/components/AccountCloseCard.js +22 -0
- package/dist/react/components/AccountCloseCard.js.map +1 -0
- package/dist/react/components/AccountCreateButton.d.ts +37 -0
- package/dist/react/components/AccountCreateButton.d.ts.map +1 -0
- package/dist/react/components/AccountCreateButton.js +30 -0
- package/dist/react/components/AccountCreateButton.js.map +1 -0
- package/dist/react/components/AccountCreateCard.d.ts +48 -0
- package/dist/react/components/AccountCreateCard.d.ts.map +1 -0
- package/dist/react/components/AccountCreateCard.js +29 -0
- package/dist/react/components/AccountCreateCard.js.map +1 -0
- package/dist/react/components/AccountLoginButton.d.ts +31 -0
- package/dist/react/components/AccountLoginButton.d.ts.map +1 -0
- package/dist/react/components/AccountLoginButton.js +31 -0
- package/dist/react/components/AccountLoginButton.js.map +1 -0
- package/dist/react/components/AccountLoginCard.d.ts +33 -0
- package/dist/react/components/AccountLoginCard.d.ts.map +1 -0
- package/dist/react/components/AccountLoginCard.js +19 -0
- package/dist/react/components/AccountLoginCard.js.map +1 -0
- package/dist/react/components/AccountOnboardingButton.d.ts +37 -0
- package/dist/react/components/AccountOnboardingButton.d.ts.map +1 -0
- package/dist/react/components/AccountOnboardingButton.js +30 -0
- package/dist/react/components/AccountOnboardingButton.js.map +1 -0
- package/dist/react/components/AccountOnboardingCard.d.ts +56 -0
- package/dist/react/components/AccountOnboardingCard.d.ts.map +1 -0
- package/dist/react/components/AccountOnboardingCard.js +36 -0
- package/dist/react/components/AccountOnboardingCard.js.map +1 -0
- package/dist/react/components/AddCardForm.d.ts +18 -0
- package/dist/react/components/AddCardForm.d.ts.map +1 -0
- package/dist/react/components/AddCardForm.js +49 -0
- package/dist/react/components/AddCardForm.js.map +1 -0
- package/dist/react/components/BillingPortalLink.d.ts +23 -0
- package/dist/react/components/BillingPortalLink.d.ts.map +1 -0
- package/dist/react/components/BillingPortalLink.js +55 -0
- package/dist/react/components/BillingPortalLink.js.map +1 -0
- package/dist/react/components/BuyerBillingView.d.ts +80 -0
- package/dist/react/components/BuyerBillingView.d.ts.map +1 -0
- package/dist/react/components/BuyerBillingView.js +44 -0
- package/dist/react/components/BuyerBillingView.js.map +1 -0
- package/dist/react/components/CheckoutSessionProvider.d.ts +34 -0
- package/dist/react/components/CheckoutSessionProvider.d.ts.map +1 -0
- package/dist/react/components/CheckoutSessionProvider.js +38 -0
- package/dist/react/components/CheckoutSessionProvider.js.map +1 -0
- package/dist/react/components/CheckoutSessionProviderWithKey.d.ts +36 -0
- package/dist/react/components/CheckoutSessionProviderWithKey.d.ts.map +1 -0
- package/dist/react/components/CheckoutSessionProviderWithKey.js +36 -0
- package/dist/react/components/CheckoutSessionProviderWithKey.js.map +1 -0
- package/dist/react/components/CheckoutStatus.d.ts +25 -0
- package/dist/react/components/CheckoutStatus.d.ts.map +1 -0
- package/dist/react/components/CheckoutStatus.js +22 -0
- package/dist/react/components/CheckoutStatus.js.map +1 -0
- package/dist/react/components/ConnectProvider.d.ts +29 -0
- package/dist/react/components/ConnectProvider.d.ts.map +1 -0
- package/dist/react/components/ConnectProvider.js +25 -0
- package/dist/react/components/ConnectProvider.js.map +1 -0
- package/dist/react/components/ConnectRequirements.d.ts +55 -0
- package/dist/react/components/ConnectRequirements.d.ts.map +1 -0
- package/dist/react/components/ConnectRequirements.js +58 -0
- package/dist/react/components/ConnectRequirements.js.map +1 -0
- package/dist/react/components/ConnectStatusBadge.d.ts +26 -0
- package/dist/react/components/ConnectStatusBadge.d.ts.map +1 -0
- package/dist/react/components/ConnectStatusBadge.js +20 -0
- package/dist/react/components/ConnectStatusBadge.js.map +1 -0
- package/dist/react/components/DeletePaymentMethodDialog.d.ts +25 -0
- package/dist/react/components/DeletePaymentMethodDialog.d.ts.map +1 -0
- package/dist/react/components/DeletePaymentMethodDialog.js +16 -0
- package/dist/react/components/DeletePaymentMethodDialog.js.map +1 -0
- package/dist/react/components/DisputeDetail.d.ts +42 -0
- package/dist/react/components/DisputeDetail.d.ts.map +1 -0
- package/dist/react/components/DisputeDetail.js +34 -0
- package/dist/react/components/DisputeDetail.js.map +1 -0
- package/dist/react/components/DisputesList.d.ts +42 -0
- package/dist/react/components/DisputesList.d.ts.map +1 -0
- package/dist/react/components/DisputesList.js +47 -0
- package/dist/react/components/DisputesList.js.map +1 -0
- package/dist/react/components/EarningsSummary.d.ts +53 -0
- package/dist/react/components/EarningsSummary.d.ts.map +1 -0
- package/dist/react/components/EarningsSummary.js +37 -0
- package/dist/react/components/EarningsSummary.js.map +1 -0
- package/dist/react/components/EmbeddedCheckout.d.ts +18 -0
- package/dist/react/components/EmbeddedCheckout.d.ts.map +1 -0
- package/dist/react/components/EmbeddedCheckout.js +17 -0
- package/dist/react/components/EmbeddedCheckout.js.map +1 -0
- package/dist/react/components/EmbeddedDisputes.d.ts +21 -0
- package/dist/react/components/EmbeddedDisputes.d.ts.map +1 -0
- package/dist/react/components/EmbeddedDisputes.js +17 -0
- package/dist/react/components/EmbeddedDisputes.js.map +1 -0
- package/dist/react/components/EvidenceForm.d.ts +63 -0
- package/dist/react/components/EvidenceForm.d.ts.map +1 -0
- package/dist/react/components/EvidenceForm.js +79 -0
- package/dist/react/components/EvidenceForm.js.map +1 -0
- package/dist/react/components/IntervalSelector.d.ts +20 -0
- package/dist/react/components/IntervalSelector.d.ts.map +1 -0
- package/dist/react/components/IntervalSelector.js +15 -0
- package/dist/react/components/IntervalSelector.js.map +1 -0
- package/dist/react/components/PaymentMethodActions.d.ts +27 -0
- package/dist/react/components/PaymentMethodActions.d.ts.map +1 -0
- package/dist/react/components/PaymentMethodActions.js +23 -0
- package/dist/react/components/PaymentMethodActions.js.map +1 -0
- package/dist/react/components/PaymentMethodsList.d.ts +32 -0
- package/dist/react/components/PaymentMethodsList.d.ts.map +1 -0
- package/dist/react/components/PaymentMethodsList.js +18 -0
- package/dist/react/components/PaymentMethodsList.js.map +1 -0
- package/dist/react/components/PayoutSchedule.d.ts +55 -0
- package/dist/react/components/PayoutSchedule.d.ts.map +1 -0
- package/dist/react/components/PayoutSchedule.js +51 -0
- package/dist/react/components/PayoutSchedule.js.map +1 -0
- package/dist/react/components/PriceBadge.d.ts +19 -0
- package/dist/react/components/PriceBadge.d.ts.map +1 -0
- package/dist/react/components/PriceBadge.js +25 -0
- package/dist/react/components/PriceBadge.js.map +1 -0
- package/dist/react/components/PriceCard.d.ts +34 -0
- package/dist/react/components/PriceCard.d.ts.map +1 -0
- package/dist/react/components/PriceCard.js +20 -0
- package/dist/react/components/PriceCard.js.map +1 -0
- package/dist/react/components/PricePicker.d.ts +28 -0
- package/dist/react/components/PricePicker.d.ts.map +1 -0
- package/dist/react/components/PricePicker.js +32 -0
- package/dist/react/components/PricePicker.js.map +1 -0
- package/dist/react/components/SplitBreakdown.d.ts +45 -0
- package/dist/react/components/SplitBreakdown.d.ts.map +1 -0
- package/dist/react/components/SplitBreakdown.js +48 -0
- package/dist/react/components/SplitBreakdown.js.map +1 -0
- package/dist/react/components/StripeProvider.d.ts +30 -0
- package/dist/react/components/StripeProvider.d.ts.map +1 -0
- package/dist/react/components/StripeProvider.js +38 -0
- package/dist/react/components/StripeProvider.js.map +1 -0
- package/dist/react/components/StripeProviderWithKey.d.ts +33 -0
- package/dist/react/components/StripeProviderWithKey.d.ts.map +1 -0
- package/dist/react/components/StripeProviderWithKey.js +44 -0
- package/dist/react/components/StripeProviderWithKey.js.map +1 -0
- package/dist/react/components/SubscriptionActions.d.ts +31 -0
- package/dist/react/components/SubscriptionActions.d.ts.map +1 -0
- package/dist/react/components/SubscriptionActions.js +30 -0
- package/dist/react/components/SubscriptionActions.js.map +1 -0
- package/dist/react/components/SubscriptionCard.d.ts +41 -0
- package/dist/react/components/SubscriptionCard.d.ts.map +1 -0
- package/dist/react/components/SubscriptionCard.js +18 -0
- package/dist/react/components/SubscriptionCard.js.map +1 -0
- package/dist/react/components/SubscriptionLineItems.d.ts +23 -0
- package/dist/react/components/SubscriptionLineItems.d.ts.map +1 -0
- package/dist/react/components/SubscriptionLineItems.js +20 -0
- package/dist/react/components/SubscriptionLineItems.js.map +1 -0
- package/dist/react/components/TrialAlert.d.ts +19 -0
- package/dist/react/components/TrialAlert.d.ts.map +1 -0
- package/dist/react/components/TrialAlert.js +16 -0
- package/dist/react/components/TrialAlert.js.map +1 -0
- package/dist/react/hooks/useAccount.d.ts +14 -0
- package/dist/react/hooks/useAccount.d.ts.map +1 -0
- package/dist/react/hooks/useAccount.js +18 -0
- package/dist/react/hooks/useAccount.js.map +1 -0
- package/dist/react/hooks/useAccountOnboarding.d.ts +15 -0
- package/dist/react/hooks/useAccountOnboarding.d.ts.map +1 -0
- package/dist/react/hooks/useAccountOnboarding.js +19 -0
- package/dist/react/hooks/useAccountOnboarding.js.map +1 -0
- package/dist/react/hooks/useCheckout.d.ts +14 -0
- package/dist/react/hooks/useCheckout.d.ts.map +1 -0
- package/dist/react/hooks/useCheckout.js +18 -0
- package/dist/react/hooks/useCheckout.js.map +1 -0
- package/dist/react/hooks/useCheckoutSession.d.ts +62 -0
- package/dist/react/hooks/useCheckoutSession.d.ts.map +1 -0
- package/dist/react/hooks/useCheckoutSession.js +68 -0
- package/dist/react/hooks/useCheckoutSession.js.map +1 -0
- package/dist/react/hooks/useConfirmPayment.d.ts +38 -0
- package/dist/react/hooks/useConfirmPayment.d.ts.map +1 -0
- package/dist/react/hooks/useConfirmPayment.js +91 -0
- package/dist/react/hooks/useConfirmPayment.js.map +1 -0
- package/dist/react/hooks/useDisputeWithCountdown.d.ts +25 -0
- package/dist/react/hooks/useDisputeWithCountdown.d.ts.map +1 -0
- package/dist/react/hooks/useDisputeWithCountdown.js +19 -0
- package/dist/react/hooks/useDisputeWithCountdown.js.map +1 -0
- package/dist/react/hooks/useDisputes.d.ts +14 -0
- package/dist/react/hooks/useDisputes.d.ts.map +1 -0
- package/dist/react/hooks/useDisputes.js +15 -0
- package/dist/react/hooks/useDisputes.js.map +1 -0
- package/dist/react/hooks/useEarnings.d.ts +92 -0
- package/dist/react/hooks/useEarnings.d.ts.map +1 -0
- package/dist/react/hooks/useEarnings.js +35 -0
- package/dist/react/hooks/useEarnings.js.map +1 -0
- package/dist/react/hooks/useInvoices.d.ts +11 -0
- package/dist/react/hooks/useInvoices.d.ts.map +1 -0
- package/dist/react/hooks/useInvoices.js +11 -0
- package/dist/react/hooks/useInvoices.js.map +1 -0
- package/dist/react/hooks/usePaymentMethodActions.d.ts +74 -0
- package/dist/react/hooks/usePaymentMethodActions.d.ts.map +1 -0
- package/dist/react/hooks/usePaymentMethodActions.js +156 -0
- package/dist/react/hooks/usePaymentMethodActions.js.map +1 -0
- package/dist/react/hooks/usePaymentMethods.d.ts +23 -0
- package/dist/react/hooks/usePaymentMethods.d.ts.map +1 -0
- package/dist/react/hooks/usePaymentMethods.js +18 -0
- package/dist/react/hooks/usePaymentMethods.js.map +1 -0
- package/dist/react/hooks/usePrices.d.ts +12 -0
- package/dist/react/hooks/usePrices.d.ts.map +1 -0
- package/dist/react/hooks/usePrices.js +16 -0
- package/dist/react/hooks/usePrices.js.map +1 -0
- package/dist/react/hooks/useProducts.d.ts +10 -0
- package/dist/react/hooks/useProducts.d.ts.map +1 -0
- package/dist/react/hooks/useProducts.js +11 -0
- package/dist/react/hooks/useProducts.js.map +1 -0
- package/dist/react/hooks/useSplitBreakdown.d.ts +58 -0
- package/dist/react/hooks/useSplitBreakdown.d.ts.map +1 -0
- package/dist/react/hooks/useSplitBreakdown.js +59 -0
- package/dist/react/hooks/useSplitBreakdown.js.map +1 -0
- package/dist/react/hooks/useStripeConfig.d.ts +14 -0
- package/dist/react/hooks/useStripeConfig.d.ts.map +1 -0
- package/dist/react/hooks/useStripeConfig.js +21 -0
- package/dist/react/hooks/useStripeConfig.js.map +1 -0
- package/dist/react/hooks/useStripeMode.d.ts +3 -0
- package/dist/react/hooks/useStripeMode.d.ts.map +1 -0
- package/dist/react/hooks/useStripeMode.js +6 -0
- package/dist/react/hooks/useStripeMode.js.map +1 -0
- package/dist/react/hooks/useStripePublishableKey.d.ts +2 -0
- package/dist/react/hooks/useStripePublishableKey.d.ts.map +1 -0
- package/dist/react/hooks/useStripePublishableKey.js +6 -0
- package/dist/react/hooks/useStripePublishableKey.js.map +1 -0
- package/dist/react/hooks/useSubscription.d.ts +17 -0
- package/dist/react/hooks/useSubscription.d.ts.map +1 -0
- package/dist/react/hooks/useSubscription.js +30 -0
- package/dist/react/hooks/useSubscription.js.map +1 -0
- package/dist/react/hooks/useSubscriptions.d.ts +11 -0
- package/dist/react/hooks/useSubscriptions.d.ts.map +1 -0
- package/dist/react/hooks/useSubscriptions.js +13 -0
- package/dist/react/hooks/useSubscriptions.js.map +1 -0
- package/dist/react/index.d.ts +108 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +87 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/lib/connect-requirement-keys.d.ts +14 -0
- package/dist/react/lib/connect-requirement-keys.d.ts.map +1 -0
- package/dist/react/lib/connect-requirement-keys.js +57 -0
- package/dist/react/lib/connect-requirement-keys.js.map +1 -0
- package/dist/react/lib/price-helpers.d.ts +31 -0
- package/dist/react/lib/price-helpers.d.ts.map +1 -0
- package/dist/react/lib/price-helpers.js +46 -0
- package/dist/react/lib/price-helpers.js.map +1 -0
- package/dist/react/lib/stripe-element-styles.d.ts +91 -0
- package/dist/react/lib/stripe-element-styles.d.ts.map +1 -0
- package/dist/react/lib/stripe-element-styles.js +131 -0
- package/dist/react/lib/stripe-element-styles.js.map +1 -0
- package/dist/react/lib/subscription-helpers.d.ts +33 -0
- package/dist/react/lib/subscription-helpers.d.ts.map +1 -0
- package/dist/react/lib/subscription-helpers.js +47 -0
- package/dist/react/lib/subscription-helpers.js.map +1 -0
- package/dist/react/types.d.ts +20 -0
- package/dist/react/types.d.ts.map +1 -0
- package/dist/react/types.js +2 -0
- package/dist/react/types.js.map +1 -0
- package/dist/testing/assert-test-env.d.ts +6 -0
- package/dist/testing/assert-test-env.d.ts.map +1 -0
- package/dist/testing/assert-test-env.js +15 -0
- package/dist/testing/assert-test-env.js.map +1 -0
- package/dist/testing/fixtures.d.ts +38 -0
- package/dist/testing/fixtures.d.ts.map +1 -0
- package/dist/testing/fixtures.js +54 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-webhooks.d.ts +19 -0
- package/dist/testing/mock-webhooks.d.ts.map +1 -0
- package/dist/testing/mock-webhooks.js +81 -0
- package/dist/testing/mock-webhooks.js.map +1 -0
- package/package.json +131 -0
- package/src/client/billing/checkout.test.ts +1234 -0
- package/src/client/billing/checkout.ts +416 -0
- package/src/client/billing/invoices.test.ts +237 -0
- package/src/client/billing/invoices.ts +93 -0
- package/src/client/billing/subscriptions.test.ts +987 -0
- package/src/client/billing/subscriptions.ts +604 -0
- package/src/client/component-api-types.test.ts +137 -0
- package/src/client/connect/disputes.test.ts +487 -0
- package/src/client/connect/disputes.ts +302 -0
- package/src/client/connect/paymentMethodUtils.test.ts +83 -0
- package/src/client/connect/paymentMethodUtils.ts +28 -0
- package/src/client/connect/paymentMethods.test.ts +66 -0
- package/src/client/connect/paymentMethods.ts +55 -0
- package/src/client/connect/payouts.test.ts +132 -0
- package/src/client/connect/payouts.ts +105 -0
- package/src/client/connect/refundActor.test.ts +121 -0
- package/src/client/connect/refundActor.ts +60 -0
- package/src/client/connect/refunds.test.ts +341 -0
- package/src/client/connect/refunds.ts +256 -0
- package/src/client/connect/transfers.test.ts +492 -0
- package/src/client/connect/transfers.ts +572 -0
- package/src/client/constants.ts +15 -0
- package/src/client/core/accountLinks.test.ts +378 -0
- package/src/client/core/accountLinks.ts +211 -0
- package/src/client/core/accountStatus.test.ts +102 -0
- package/src/client/core/accountStatus.ts +91 -0
- package/src/client/core/accounts.test.ts +1496 -0
- package/src/client/core/accounts.ts +667 -0
- package/src/client/core/config.test.ts +68 -0
- package/src/client/core/config.ts +27 -0
- package/src/client/core/descriptors.test.ts +68 -0
- package/src/client/core/descriptors.ts +46 -0
- package/src/client/core/fees.test.ts +377 -0
- package/src/client/core/fees.ts +268 -0
- package/src/client/errors.test.ts +66 -0
- package/src/client/errors.ts +70 -0
- package/src/client/helpers.test.ts +74 -0
- package/src/client/helpers.ts +94 -0
- package/src/client/index.test.ts +1848 -0
- package/src/client/index.ts +1872 -0
- package/src/client/products/prices.test.ts +345 -0
- package/src/client/products/prices.ts +194 -0
- package/src/client/products/products.test.ts +476 -0
- package/src/client/products/products.ts +335 -0
- package/src/client/setup.test.ts +47 -0
- package/src/client/stripe-types.ts +108 -0
- package/src/client/types/documents.ts +245 -0
- package/src/client/types/events.ts +72 -0
- package/src/client/types/index.ts +43 -0
- package/src/client/types/options.ts +103 -0
- package/src/client/types/triggers.ts +293 -0
- package/src/client/types.ts +35 -0
- package/src/client/utils/data.test.ts +59 -0
- package/src/client/utils/data.ts +22 -0
- package/src/client/utils/owner.test.ts +35 -0
- package/src/client/utils/owner.ts +27 -0
- package/src/client/utils/stripeDashboardUrl.test.ts +71 -0
- package/src/client/utils/stripeDashboardUrl.ts +71 -0
- package/src/client/utils/webhookEndpoints.test.ts +454 -0
- package/src/client/utils/webhookEndpoints.ts +271 -0
- package/src/client/webhook-handlers.test.ts +603 -0
- package/src/client/webhooks/handler.test.ts +604 -0
- package/src/client/webhooks/handler.ts +256 -0
- package/src/client/webhooks/helpers.test.ts +330 -0
- package/src/client/webhooks/helpers.ts +277 -0
- package/src/client/webhooks/hooks.test.ts +111 -0
- package/src/client/webhooks/hooks.ts +177 -0
- package/src/client/webhooks/index.ts +51 -0
- package/src/client/webhooks/processors.test.ts +2392 -0
- package/src/client/webhooks/processors.ts +1166 -0
- package/src/client/webhooks/v2.test.ts +396 -0
- package/src/client/webhooks/v2.ts +124 -0
- package/src/client/webhooks.test.ts +1689 -0
- package/src/client/webhooks.ts +3 -0
- package/src/component/_generated/api.ts +86 -0
- package/src/component/_generated/component.ts +1758 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +164 -0
- package/src/component/billing/mutations.ts +155 -0
- package/src/component/billing/queries.ts +378 -0
- package/src/component/billing/schema.ts +40 -0
- package/src/component/billing/validators.ts +137 -0
- package/src/component/config-queries.test.ts +47 -0
- package/src/component/connect/mutations.ts +624 -0
- package/src/component/connect/queries.ts +537 -0
- package/src/component/connect/schema.ts +90 -0
- package/src/component/connect/validators.ts +333 -0
- package/src/component/connect.test.ts +721 -0
- package/src/component/convex.config.ts +17 -0
- package/src/component/core/mutations.ts +182 -0
- package/src/component/core/queries.ts +100 -0
- package/src/component/core/schema.ts +13 -0
- package/src/component/core/validators.ts +55 -0
- package/src/component/earnings-totals.test.ts +196 -0
- package/src/component/fee-routing.test.ts +124 -0
- package/src/component/lib/fees.ts +64 -0
- package/src/component/lib/idempotency.test.ts +37 -0
- package/src/component/lib/idempotency.ts +20 -0
- package/src/component/lib/reversals.ts +113 -0
- package/src/component/lib/stripeFactory.ts +30 -0
- package/src/component/products/mutations.ts +73 -0
- package/src/component/products/queries.ts +149 -0
- package/src/component/products/schema.ts +22 -0
- package/src/component/products/validators.ts +63 -0
- package/src/component/public.test.ts +1858 -0
- package/src/component/reversal-races.test.ts +920 -0
- package/src/component/schema.ts +45 -0
- package/src/component/subscription-scoping.test.ts +118 -0
- package/src/component/transfers.test.ts +402 -0
- package/src/component/triggers.test.ts +359 -0
- package/src/component/webhooks/mutations.ts +151 -0
- package/src/component/webhooks/queries.ts +44 -0
- package/src/component/webhooks/schema.ts +10 -0
- package/src/component/webhooks/validators.ts +30 -0
- package/src/react/components/AccountCloseButton.tsx +91 -0
- package/src/react/components/AccountCloseCard.tsx +84 -0
- package/src/react/components/AccountCreateButton.tsx +83 -0
- package/src/react/components/AccountCreateCard.tsx +123 -0
- package/src/react/components/AccountLoginButton.tsx +69 -0
- package/src/react/components/AccountLoginCard.tsx +99 -0
- package/src/react/components/AccountOnboardingButton.tsx +83 -0
- package/src/react/components/AccountOnboardingCard.test.ts +27 -0
- package/src/react/components/AccountOnboardingCard.tsx +152 -0
- package/src/react/components/AddCardForm.tsx +80 -0
- package/src/react/components/BillingPortalLink.tsx +93 -0
- package/src/react/components/BuyerBillingView.render.test.tsx +207 -0
- package/src/react/components/BuyerBillingView.tsx +193 -0
- package/src/react/components/CheckoutSessionProvider.tsx +70 -0
- package/src/react/components/CheckoutSessionProviderWithKey.tsx +99 -0
- package/src/react/components/CheckoutStatus.tsx +71 -0
- package/src/react/components/ConnectProvider.tsx +58 -0
- package/src/react/components/ConnectRequirements.tsx +159 -0
- package/src/react/components/ConnectStatusBadge.tsx +60 -0
- package/src/react/components/DeletePaymentMethodDialog.tsx +61 -0
- package/src/react/components/DisputeDetail.render.test.tsx +143 -0
- package/src/react/components/DisputeDetail.tsx +111 -0
- package/src/react/components/DisputesList.render.test.tsx +244 -0
- package/src/react/components/DisputesList.tsx +120 -0
- package/src/react/components/EarningsSummary.render.test.tsx +153 -0
- package/src/react/components/EarningsSummary.tsx +131 -0
- package/src/react/components/EmbeddedCheckout.test.ts +25 -0
- package/src/react/components/EmbeddedCheckout.tsx +54 -0
- package/src/react/components/EmbeddedDisputes.render.test.tsx +142 -0
- package/src/react/components/EmbeddedDisputes.tsx +38 -0
- package/src/react/components/EvidenceForm.render.test.tsx +215 -0
- package/src/react/components/EvidenceForm.tsx +176 -0
- package/src/react/components/IntervalSelector.tsx +58 -0
- package/src/react/components/PaymentMethodActions.tsx +68 -0
- package/src/react/components/PaymentMethodsList.tsx +81 -0
- package/src/react/components/PayoutSchedule.render.test.tsx +178 -0
- package/src/react/components/PayoutSchedule.tsx +148 -0
- package/src/react/components/PriceBadge.render.test.tsx +134 -0
- package/src/react/components/PriceBadge.tsx +49 -0
- package/src/react/components/PriceCard.render.test.tsx +135 -0
- package/src/react/components/PriceCard.tsx +83 -0
- package/src/react/components/PricePicker.tsx +95 -0
- package/src/react/components/SplitBreakdown.render.test.tsx +168 -0
- package/src/react/components/SplitBreakdown.tsx +121 -0
- package/src/react/components/StripeProvider.test.ts +45 -0
- package/src/react/components/StripeProvider.tsx +80 -0
- package/src/react/components/StripeProviderWithKey.tsx +95 -0
- package/src/react/components/SubscriptionActions.tsx +79 -0
- package/src/react/components/SubscriptionCard.tsx +92 -0
- package/src/react/components/SubscriptionLineItems.tsx +62 -0
- package/src/react/components/TrialAlert.render.test.tsx +132 -0
- package/src/react/components/TrialAlert.tsx +44 -0
- package/src/react/hooks/skipSentinel.test.ts +85 -0
- package/src/react/hooks/useAccount.ts +28 -0
- package/src/react/hooks/useAccountOnboarding.test.ts +75 -0
- package/src/react/hooks/useAccountOnboarding.ts +35 -0
- package/src/react/hooks/useCheckout.ts +33 -0
- package/src/react/hooks/useCheckoutSession.ts +110 -0
- package/src/react/hooks/useConfirmPayment.ts +117 -0
- package/src/react/hooks/useDisputeWithCountdown.test.ts +90 -0
- package/src/react/hooks/useDisputeWithCountdown.ts +48 -0
- package/src/react/hooks/useDisputes.test.ts +75 -0
- package/src/react/hooks/useDisputes.ts +28 -0
- package/src/react/hooks/useEarnings.test.ts +159 -0
- package/src/react/hooks/useEarnings.ts +132 -0
- package/src/react/hooks/useInvoices.test.ts +79 -0
- package/src/react/hooks/useInvoices.ts +25 -0
- package/src/react/hooks/usePaymentMethodActions.ts +206 -0
- package/src/react/hooks/usePaymentMethods.ts +44 -0
- package/src/react/hooks/usePrices.ts +26 -0
- package/src/react/hooks/useProducts.test.ts +75 -0
- package/src/react/hooks/useProducts.ts +24 -0
- package/src/react/hooks/useSplitBreakdown.test.ts +151 -0
- package/src/react/hooks/useSplitBreakdown.ts +118 -0
- package/src/react/hooks/useStripeConfig.ts +31 -0
- package/src/react/hooks/useStripeMode.test.ts +49 -0
- package/src/react/hooks/useStripeMode.ts +9 -0
- package/src/react/hooks/useStripePublishableKey.test.ts +35 -0
- package/src/react/hooks/useStripePublishableKey.ts +9 -0
- package/src/react/hooks/useSubscription.ts +52 -0
- package/src/react/hooks/useSubscriptions.ts +33 -0
- package/src/react/index.payment-element.test.ts +41 -0
- package/src/react/index.test.ts +167 -0
- package/src/react/index.ts +279 -0
- package/src/react/lib/connect-requirement-keys.test.ts +73 -0
- package/src/react/lib/connect-requirement-keys.ts +66 -0
- package/src/react/lib/price-helpers.test.ts +199 -0
- package/src/react/lib/price-helpers.ts +68 -0
- package/src/react/lib/stripe-element-styles.test.ts +94 -0
- package/src/react/lib/stripe-element-styles.ts +178 -0
- package/src/react/lib/subscription-helpers.test.ts +127 -0
- package/src/react/lib/subscription-helpers.ts +64 -0
- package/src/react/types.ts +32 -0
- package/src/test.ts +5 -0
- package/src/testing/assert-test-env.test.ts +33 -0
- package/src/testing/assert-test-env.ts +20 -0
- package/src/testing/fixtures.ts +95 -0
- package/src/testing/index.ts +13 -0
- package/src/testing/mock-webhooks.test.ts +97 -0
- package/src/testing/mock-webhooks.ts +101 -0
- package/src/vite-env.d.ts +4 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
**Renamed to `@fantastic.dev/better-stripe`.** This is the first release under the new name, published from `FantasticDevHQ/better-stripe` through npm trusted publishing with provenance. `@getdojo/better-stripe` is deprecated and gets no further releases. To migrate, replace `@getdojo/better-stripe` with `@fantastic.dev/better-stripe` in `package.json`, in imports and in `convex.config.ts`, then run `npx convex dev` to regenerate `_generated/`. The API is unchanged by the rename.
|
|
6
|
+
|
|
7
|
+
`0.3.0` was versioned but never published, so this release also ships everything listed under `0.3.0` below, including its breaking webhook-wiring change.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add `getAccountBalance` for per-account balance retrieval (BTS-65, [#62](https://github.com/kellykampen/better-stripe/issues/62)).
|
|
12
|
+
|
|
13
|
+
New `BetterStripe.getAccountBalance({ stripeAccountId })` reads a connected account's live Stripe balance, scoped via the `Stripe-Account` header (mirroring the other per-account calls like `createPayout`). Pairs Stripe's separate `available`/`pending` per-currency lists into one `AccountBalance` (`{ available, pending, currency }`, minor units) per currency — a currency present on only one side defaults to `0` on the other. `AccountBalance` is re-exported at the package root, and its shape matches the `PayoutSchedule` component's `balance` prop directly.
|
|
14
|
+
|
|
15
|
+
Purely additive.
|
|
16
|
+
|
|
17
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add headless `BuyerBillingView` component (BTS-39, [#50](https://github.com/kellykampen/better-stripe/issues/50)).
|
|
18
|
+
|
|
19
|
+
The buyer's embedded-only, in-app billing surface: shows a buyer's subscriptions grouped by store (via the existing `groupSubscriptionsByStore` util, not recomputed), with per-store cancel/reactivate through the shared `SubscriptionCard`/`SubscriptionActions`, the one saved payment method reusable across every store, and an embedded (no-redirect) card-update slot.
|
|
20
|
+
|
|
21
|
+
React-surface only — no server/schema changes, no new dependencies. Full headless convention: `className`, per-label i18n overrides, `children` render-prop, loading/empty states. Purely additive.
|
|
22
|
+
|
|
23
|
+
- [#22](https://github.com/kellykampen/better-stripe/pull/22) [`ad52d4a`](https://github.com/kellykampen/better-stripe/commit/ad52d4a083d27b1c82f5a043043a988fc60e8fed) Thanks [@kellykampen](https://github.com/kellykampen)! - Add support for the V2 **customer configuration** — the billable entity in the V2 Accounts API, where a single Account with a customer configuration replaces the legacy V1 Customer object.
|
|
24
|
+
|
|
25
|
+
- `BetterStripe.addCustomerConfiguration(ctx, { stripeAccountId })` — applies the customer configuration to an existing account (making it usable in customer-facing payment/billing flows: subscriptions, invoices, and the billing portal via `customer_account: acct_…`), re-reads the configurations Stripe actually applied, and records them on the component account. Throws `ACCOUNT_NOT_FOUND` (without touching Stripe) if the account isn't in the component DB. Returns `{ success: true, appliedConfigurations }`.
|
|
26
|
+
- `BetterStripe.DEFAULT_CUSTOMER_CONFIGURATION` — the documented `{ customer: {} }` preset. Request `customer.capabilities.automatic_indirect_tax` separately if you need automatic tax on this account's invoices/subscriptions.
|
|
27
|
+
|
|
28
|
+
Previously `DEFAULT_ACCOUNT_CONFIGURATION` only requested the merchant configuration, so there was no first-class path to create a customer-billable account.
|
|
29
|
+
|
|
30
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add `DisputeDetail` + `EvidenceForm` headless React components (BTS-54, [#40](https://github.com/kellykampen/better-stripe/issues/40)).
|
|
31
|
+
|
|
32
|
+
- `DisputeDetail` — renders a dispute's amount, reason, status, evidence-due countdown message, and linked transfer ids. Loading/empty states, i18n label overrides.
|
|
33
|
+
- `EvidenceForm` — headless controlled form for the four Skool-style evidence fields (product description, access activity, additional info, customer communication); `stage()` saves a draft (no `submit` key), `submit()` finalizes with `submit: true`. Supports `stripeAccountId` scoping and `onStaged`/`onSubmitted`/`onError` callbacks.
|
|
34
|
+
|
|
35
|
+
Both are headless/themeable (`className` plus a `children` render-prop) and consume the existing BTS-31/BTS-53 core with no duplicated logic. Purely additive.
|
|
36
|
+
|
|
37
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add headless `DisputesList` component with due-by countdown badges (BTS-40, [#41](https://github.com/kellykampen/better-stripe/issues/41)).
|
|
38
|
+
|
|
39
|
+
Pure, hook-free presentational list of a seller's disputes, sorted by evidence deadline (soonest first, no-deadline rows last, overdue rows naturally at the top). Rows accept the exact shape `getDisputeWithCountdown`/`useDisputeWithCountdown` (BTS-53) produce, so the component never recomputes deadlines itself.
|
|
40
|
+
|
|
41
|
+
Headless overrides: `className`, i18n labels (`emptyLabel`, `loadingLabel`, `dueLabel`/`overdueLabel` with `{days}` templating), a per-row `renderRow` slot, and a whole-list `children` render prop. Default markup is semantic `ul[role=list] > li[data-dispute-id]` with a `span[role=status]` badge carrying `data-overdue`. Purely additive.
|
|
42
|
+
|
|
43
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add dispute React hooks: `createUseDisputes` + `createUseDisputeWithCountdown` (BTS-53, [#36](https://github.com/kellykampen/better-stripe/issues/36)).
|
|
44
|
+
|
|
45
|
+
Two new factory hooks following the existing `createUse*` convention:
|
|
46
|
+
|
|
47
|
+
- `createUseDisputes` — wraps `listDisputes` with `account`/`status` filters (list-style, mirrors `createUseInvoices`); returns `{ disputes, isLoading }`.
|
|
48
|
+
- `createUseDisputeWithCountdown` — wraps `getDisputeWithCountdown` for a single dispute id (mirrors `createUseSubscription`); returns `{ dispute, countdown, isLoading }`, using Convex's `"skip"` sentinel when no id is provided.
|
|
49
|
+
|
|
50
|
+
Both wired into the `@getdojo/better-stripe/react` entry export; `StripeComponentDispute` re-exported for consumers. Purely additive.
|
|
51
|
+
|
|
52
|
+
- [#51](https://github.com/kellykampen/better-stripe/pull/51) [`6345352`](https://github.com/kellykampen/better-stripe/commit/6345352cf4b3ad4247c865090693e877da6bf5ef) Thanks [@kellykampen](https://github.com/kellykampen)! - Smart-retry dunning: surface failed subscription cycles (BTS-33).
|
|
53
|
+
|
|
54
|
+
`invoice.payment_failed` previously upserted the invoice but fired **no** async hook, so apps couldn't react to a failed subscription cycle. It now schedules a new invoice-level hook:
|
|
55
|
+
|
|
56
|
+
- **`AsyncHooks.onInvoicePaymentFailed(ctx, invoice)`** — fires on `invoice.payment_failed` (mapped to the internal `afterInvoicePaymentFailed` hook). This is the invoice-level (subscription-cycle) failure, distinct from `onPaymentFailed`, which fires on a one-time **PaymentIntent** failure and receives a payment, not an invoice. The delinquency transition itself (`past_due` → `unpaid`) still arrives via `customer.subscription.updated` → `onSubscriptionUpdated`.
|
|
57
|
+
|
|
58
|
+
**Retry metadata on the invoice row** (two new optional fields, additive — no migration): `nextPaymentAttempt` (ISO time of Stripe's next Smart Retry) and `attemptCount`. The dunning hook receives these on the committed invoice so an email can tell the buyer when Stripe will retry.
|
|
59
|
+
|
|
60
|
+
**No custom retry loop.** Recovery timing is owned by Stripe Smart Retries — enable it in the Dashboard (Billing → Revenue recovery → Retries for subscriptions; Settings → Billing → Invoices for one-time invoices). See the README "Dunning & smart retries" section.
|
|
61
|
+
|
|
62
|
+
**Breaking (pre-1.0):** the internal `AsyncHookName` union grew by `afterInvoicePaymentFailed`. Apps using the recommended `webhookHandlers()` + `webhooks: internal.stripe` wiring need **no changes** — the pair is unchanged and the new hook field is optional.
|
|
63
|
+
|
|
64
|
+
Note: covered by unit tests (hook scheduling, invoice state transition + retry metadata, `past_due`/`unpaid` persistence). The live `invoice.payment_failed` path (real failed-card subscription cycle) should be exercised by the E2E webhook run before release.
|
|
65
|
+
|
|
66
|
+
- [#64](https://github.com/kellykampen/better-stripe/pull/64) [`477e282`](https://github.com/kellykampen/better-stripe/commit/477e282ea1cfd2fc198f1aa19cc376eea96b38ca) Thanks [@kellykampen](https://github.com/kellykampen)! - Exact earnings totals — fix silently truncated financial figures past 50 rows (BTS-64).
|
|
67
|
+
|
|
68
|
+
`listTransfersByAccount` and `listPayouts` cap their results at 50 rows, and the `useEarnings` hook summed those rows client-side — so an account with more than 50 transfers or payouts reported **silently wrong** (understated) gross / reversed / net / paid-out totals, with no error.
|
|
69
|
+
|
|
70
|
+
**Fix:** two new server-side aggregate queries sum the account's whole ledger, paginated to completion, so totals are exact regardless of row count:
|
|
71
|
+
|
|
72
|
+
- **`connect/queries/getAccountEarnings({ destinationAccountId, previewLimit? })`** → `{ gross, reversed, transferCount, transfers }`. Exact `gross`/`reversed` over every transfer (incl. reinstatements — the earnings view); `transfers` is a bounded preview (`previewLimit ?? 50`) for drill-down.
|
|
73
|
+
- **`connect/queries/getAccountPayouts({ accountId, previewLimit? })`** → `{ paidOut, payoutCount, payouts }`. Exact `paidOut` over every `paid` payout; `payouts` is a bounded preview.
|
|
74
|
+
|
|
75
|
+
Exact up to Convex's per-query read limit; beyond that the query throws (loud) rather than silently truncating — strictly safer than a fixed cap for money figures.
|
|
76
|
+
|
|
77
|
+
**`createUseEarnings` now wires these aggregate queries** instead of the capped list queries. Its factory still takes `(useQuery, earningsQueryRef, payoutsQueryRef)` — point the refs at `getAccountEarnings` / `getAccountPayouts`. `UseEarningsResult` keeps `gross`/`reversed`/`net`/`paidOut`/`payouts`/`transfers` (now exact totals + a bounded preview) and adds `transferCount` / `payoutCount` for "showing N of M" UIs. `EarningsSummary` is unaffected (it reads the same figures).
|
|
78
|
+
|
|
79
|
+
**Behavior change:** if you wired `createUseEarnings` against `listTransfersByAccount` / `listPayouts`, repoint the refs at the new aggregate queries. The list queries and `BetterStripe.listPayouts()` are unchanged, now documented as capped drill-down views. `listTransfersByCharge` (per-sale split legs) is unchanged and safe in practice — a sale has few legs.
|
|
80
|
+
|
|
81
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add `createUseEarnings` + `createUseSplitBreakdown` React hook factories (BTS-36, [#44](https://github.com/kellykampen/better-stripe/issues/44)).
|
|
82
|
+
|
|
83
|
+
- `createUseEarnings(useQuery, transfersRef, payoutsRef)` → `useEarnings(accountId)` reads a recipient's transfer ledger and payouts, deriving `gross` (total transferred in), `reversed` (pulled back via fee collection + refund/dispute clawbacks — deliberately not labeled "fees", since a true platform-fees figure lives on the payments rows' `feeCollectedAmount`), `net`, `payouts`/`paidOut`, and the raw `transfers` for drill-down.
|
|
84
|
+
- `createUseSplitBreakdown(useQuery, transfersByChargeRef)` → `useSplitBreakdown({ sourceChargeId, saleAmount? })` sums a sale's split legs by role (`store`/`affiliate`/`other`), each net of reversals, with the `platform` share derived when the caller supplies the sale amount.
|
|
85
|
+
|
|
86
|
+
Both follow the `createUse*` factory convention from BTS-53. Purely additive.
|
|
87
|
+
|
|
88
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add embedded Stripe Connect dispute components (BTS-55, [#48](https://github.com/kellykampen/better-stripe/issues/48)).
|
|
89
|
+
|
|
90
|
+
The Stripe-hosted alternative to the headless dispute components, built on `@stripe/react-connect-js`:
|
|
91
|
+
|
|
92
|
+
- `ConnectProvider` — initializes ConnectJS once per mount via `loadConnectAndInitialize({ publishableKey, fetchClientSecret, appearance?, locale? })` and provides the instance through `ConnectComponentsProvider`. `fetchClientSecret` wires to an app action wrapping `stripe.createDisputeSession({ stripeAccountId })` (BTS-30).
|
|
93
|
+
- `EmbeddedDisputes` — mounts Stripe's `disputes_list` embedded component, or `payment_disputes` scoped to one payment via the `payment` prop. Must render inside `ConnectProvider`.
|
|
94
|
+
|
|
95
|
+
Adds `@stripe/connect-js` and `@stripe/react-connect-js` as regular dependencies, mirroring the existing `@stripe/stripe-js`/`@stripe/react-stripe-js` convention. Purely additive.
|
|
96
|
+
|
|
97
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add headless `PayoutSchedule` component for recipient balance + payout display (BTS-38, [#46](https://github.com/kellykampen/better-stripe/issues/46)).
|
|
98
|
+
|
|
99
|
+
Pure, hook-free component showing a seller's available/pending balance (from a `RecipientBalance` snapshot prop) and next payout — the earliest `pending`/`in_transit` payout row with an arrival date, templated as "Next payout of $40.00 expected Jul 10, 2026", falling back to a rolling-schedule message when none is upcoming (payouts are automatic/rolling; the component deliberately offers no manual withdrawal). Optional `manageUrl` link out to the hosted Express dashboard.
|
|
100
|
+
|
|
101
|
+
Headless conventions: `className`, i18n label overrides, loading/empty states, and a `children` render-prop with all computed state. Data comes entirely via props (no data-fetching hook yet); purely additive.
|
|
102
|
+
|
|
103
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add product-level `statement_descriptor` so it covers a subscription's first charge (BTS-67, [#63](https://github.com/kellykampen/better-stripe/issues/63)).
|
|
104
|
+
|
|
105
|
+
The invoice-time descriptor path (BTS-32) sets the descriptor at `invoice.created`, which never reaches a subscription's first invoice — Stripe finalizes and (for `charge_automatically`/Checkout subscription-mode) pays invoice [#1](https://github.com/kellykampen/better-stripe/issues/1) synchronously at creation, before that handler runs. Per Stripe's descriptor precedence (Invoice → Product → charge-type default), a product-level `statement_descriptor` covers every cycle including the first.
|
|
106
|
+
|
|
107
|
+
`createProduct`/`updateProduct` now resolve the per-store descriptor (the store's stored suffix, else the platform default — mirroring the BTS-32 account-level resolution) and stamp it onto the Stripe Product's `statement_descriptor`, for products with an `accountId`. No public API change to existing call shapes.
|
|
108
|
+
|
|
109
|
+
- [#70](https://github.com/kellykampen/better-stripe/pull/70) [`306d402`](https://github.com/kellykampen/better-stripe/commit/306d402b0148e0794a2239a5c83a0d3780300c38) Thanks [@kellykampen](https://github.com/kellykampen)! - Reclaim/expiry of dead reversal claims (BTS-74).
|
|
110
|
+
|
|
111
|
+
BTS-63 reserves reversal slices atomically before money moves; the executor now refuses to leapfrog an unexecuted predecessor claim. The residual, by-design failure mode: if the operation that reserved a slice dies permanently (its webhook exhausts Stripe's retries and never confirms), the claim frontier stays ahead of the confirmed `reversedAmount` forever, and every successor reversal on that leg blocks with `predecessor claim unexecuted`. This adds an ops path to resolve such wedged legs.
|
|
112
|
+
|
|
113
|
+
- **`BetterStripe.listWedgedReversalClaims(ctx)`** — lists legs where `reversalClaimedAmount > reversedAmount` and the recorded ops holding the blocking (unexecuted) slice on each. An ops/admin diagnostic; scans the ledger to completion (exact, and loud past Convex's 16,384-doc read limit rather than silently truncating).
|
|
114
|
+
- **`BetterStripe.reclaimReversalClaim(ctx, { operationId, mode })`** — resolves a dead claim:
|
|
115
|
+
- `mode: "reexecute"` (default, always safe): replays the op's recorded slices under the original `bs_rev_<opId>_<transferId>` idempotency keys, moving any money that never moved and recording any that moved-but-wasn't-confirmed. Fills the hole so blocked successors proceed; cannot double-reverse.
|
|
116
|
+
- `mode: "release"`: abandons the claim (rewinds each leg's frontier to the pre-claim amount and deletes the op record). Gated on BOTH the op being older than `minAgeMs` (default ~24h, past Stripe's idempotency-key window) AND live Stripe `amount_reversed ≤ slice.from` on every leg; the component mutation additionally refuses if a successor already claimed past the slice (re-execute instead).
|
|
117
|
+
|
|
118
|
+
New component functions: `connect/queries/listWedgedReversalClaims`, `connect/queries/getReversalOp`, `connect/mutations/releaseReversalClaim`. No behavior change to existing reversal paths.
|
|
119
|
+
|
|
120
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add refund actor scoping — seller (own sales) vs platform admin (BTS-35, [#56](https://github.com/kellykampen/better-stripe/issues/56)).
|
|
121
|
+
|
|
122
|
+
`createRefund` (BTS-34) previously had no notion of who may initiate a refund. It now takes an optional `actor` option (`{ type: "admin" }` or `{ type: "seller", accountId }`) and enforces the rule before any Stripe call is made — an unauthorized refund never moves money. A platform admin may refund any sale; a seller may refund only sales routed to their own connected account (destination charge, or one of the split legs in a separate-charges split), resolved from the payment's own component-ledger routing. Fails closed: a seller is denied when the payment's routing can't be resolved.
|
|
123
|
+
|
|
124
|
+
Additive and backwards compatible — omitting `actor` preserves the prior unrestricted behavior. The refund fee/transfer-reversal math from BTS-34 is unchanged.
|
|
125
|
+
|
|
126
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Refunds now return the platform fee pro-rata and reverse recipient transfers (BTS-34, [#45](https://github.com/kellykampen/better-stripe/issues/45)).
|
|
127
|
+
|
|
128
|
+
**Destination charges:** `createRefund` gains `refundApplicationFee` and `reverseTransfer` options, both defaulting `true`, sent only when the charge actually carries an application fee / destination transfer (sending either on an incapable charge is a hard Stripe error). Stripe pro-rates both natively for partial refunds; an explicit `false` always wins.
|
|
129
|
+
|
|
130
|
+
**Split sales (transfer math):** a new `reverseTransfersForRefund` (driven from `refund.created`/`refund.updated`, so pending→succeeded ACH refunds and Dashboard-issued refunds both claw back) converges each ledger leg on a cumulative reversal target — `round(leg × amount_refunded / amount)` — and reverses only the delta above the already-recorded amount, so at-least-once webhook delivery can't double-record the ledger or trip Stripe idempotency-key conflicts.
|
|
131
|
+
|
|
132
|
+
Additive; no breaking changes to `createRefund`'s existing call shape.
|
|
133
|
+
|
|
134
|
+
- [`11425b3`](https://github.com/kellykampen/better-stripe/commit/11425b3d91da6fd87650569c015de1bb75b7e61e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add refund and dispute tracking (plan 011).
|
|
135
|
+
|
|
136
|
+
**New webhook events** added to `BETTER_STRIPE_WEBHOOK_EVENTS` (add these to your event destination / endpoint's `enabledEvents`):
|
|
137
|
+
|
|
138
|
+
- Refunds: `refund.created`, `refund.updated`, `refund.failed`
|
|
139
|
+
- Disputes: `charge.dispute.created`, `.updated`, `.closed`, `.funds_withdrawn`, `.funds_reinstated`
|
|
140
|
+
|
|
141
|
+
**New component tables:** `refunds` and `disputes`, synced from those events. Refunds denormalize cumulative state onto the linked `payments` row — two new optional fields, `refundedAmount` and `refundStatus` (`"partially_refunded" | "fully_refunded"`) — so consumers can answer "is this payment whole?" in a single read. Both additions are optional/additive (no migration required).
|
|
142
|
+
|
|
143
|
+
**New `BetterStripe` methods:**
|
|
144
|
+
|
|
145
|
+
- `createRefund`, `getRefundByStripeId`, `listRefunds`
|
|
146
|
+
- `getDisputeByStripeId`, `listDisputes`, `updateDispute` (submit evidence), `closeDispute`
|
|
147
|
+
|
|
148
|
+
**New triggers/hooks:** `SyncTriggers.refund` / `SyncTriggers.dispute` (sync, same-transaction) and `AsyncHooks.onRefundCreated` / `onDisputeCreated` / `onDisputeClosed` (async, after-commit).
|
|
149
|
+
|
|
150
|
+
**Breaking (pre-1.0):** the internal `TriggerDispatcherName` / `AsyncHookName` unions grew (added `refundUpserted`, `disputeUpserted`, `afterRefundCreated`, `afterDisputeCreated`, `afterDisputeClosed`). Apps using the recommended `webhookHandlers()` + `webhooks: internal.stripe` wiring need **no changes** — the pair is unchanged and all trigger/hook fields are optional. No app-level migration is required.
|
|
151
|
+
|
|
152
|
+
Note: V2 `customer_account` + `pause_collection`/dispute interplay and the refund-via-API path are covered by unit tests; the live E2E (`refund.created` via real API call, dispute triggers) should be run before release — `charge.dispute.funds_withdrawn`/`funds_reinstated` cannot be reliably triggered in test mode.
|
|
153
|
+
|
|
154
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add `SplitBreakdown` + `EarningsSummary` headless components (BTS-37, [#49](https://github.com/kellykampen/better-stripe/issues/49)).
|
|
155
|
+
|
|
156
|
+
- `SplitBreakdown` renders a sale's store + affiliate + platform lines (the `other` bucket only when it carries money) from `useSplitBreakdown`'s totals. When the platform share is underivable (no sale amount given to the hook) it renders an explicit "Unknown without the sale amount" state — never a silent zero.
|
|
157
|
+
- `EarningsSummary` renders gross / reversals / net / paid-out plus the latest payout status line. Its props are a subset of `useEarnings`'s result shape, so `<EarningsSummary {...useEarnings(accountId)} />` works directly.
|
|
158
|
+
|
|
159
|
+
Consumes the BTS-36 hooks ([#44](https://github.com/kellykampen/better-stripe/issues/44)). Both headless/themeable (`className` + `children` render-prop). Purely additive.
|
|
160
|
+
|
|
161
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Add per-store statement descriptors on destination charges (BTS-32, [#47](https://github.com/kellykampen/better-stripe/issues/47)).
|
|
162
|
+
|
|
163
|
+
- New `BetterStripe.setAccountStatementDescriptor` method (validates first; `null` clears) writes a `statementDescriptor` field on the component's account record via a new `core/mutations/setStatementDescriptor` mutation.
|
|
164
|
+
- New constructor option `statementDescriptorSuffix` sets a configurable platform-wide default (validated at construction, same pattern as `platformFee`), used whenever a store account carries no suffix of its own. Resolution order: store's stored suffix → configured default → none.
|
|
165
|
+
- Applied on every destination charge: one-time payment mode sets `payment_intent_data.statement_descriptor_suffix` at session creation; subscriptions (which can't carry a suffix directly) stash the resolved value as a `bsStatementDescriptor` metadata marker, applied by a new `applyStatementDescriptor` webhook processor.
|
|
166
|
+
|
|
167
|
+
Purely additive — no existing method signatures change.
|
|
168
|
+
|
|
169
|
+
- [`a821651`](https://github.com/kellykampen/better-stripe/commit/a82165187295c1b0992726566d9e96060370a0eb) Thanks [@kellykampen](https://github.com/kellykampen)! - Expand the subscription write surface with five new `BetterStripe` methods, all routing through the component's webhook-sync path (`customer.subscription.updated` → `subscriptionUpserted`) and returning `{ success: true }`:
|
|
170
|
+
|
|
171
|
+
- `pauseSubscription` — sets `pause_collection` (defaults `behavior: "keep_as_draft"`, optional `resumesAt`).
|
|
172
|
+
- `resumeSubscription` — clears `pause_collection` via the empty-string sentinel.
|
|
173
|
+
- `updateSubscriptionPrice` — swaps the first item's price; defaults `prorationBehavior: "none"` (no proration line items), caller-overridable.
|
|
174
|
+
- `updateSubscriptionMetadata` — merges/upserts metadata keys (existing keys not included are preserved).
|
|
175
|
+
- `updateSubscriptionTrialEnd` — extends or ends a trial (`"now"` or a Unix timestamp).
|
|
176
|
+
|
|
177
|
+
Also: the existing `cancelSubscription`, `reactivateSubscription`, and `updateSubscriptionQuantity` now wrap their Stripe SDK calls in `throwStripeError`, so failures surface as a structured `ConvexError<BetterStripeError>` (`STRIPE_API_ERROR`) instead of a raw `Error`.
|
|
178
|
+
|
|
179
|
+
- [#54](https://github.com/kellykampen/better-stripe/pull/54) [`3c5f07b`](https://github.com/kellykampen/better-stripe/commit/3c5f07bbd89f1461f616be04fa2bf23276487377) Thanks [@kellykampen](https://github.com/kellykampen)! - Add `BetterStripe.listTransfersByCharge` and `BetterStripe.listTransfersByAccount` — client read wrappers over the component's transfer-ledger queries.
|
|
180
|
+
|
|
181
|
+
- `listTransfersByCharge(ctx, { sourceChargeId, limit? })` — a sale's original split legs (reinstatement rows excluded), the read behind the `useSplitBreakdown` hook / per-sale breakdown UIs.
|
|
182
|
+
- `listTransfersByAccount(ctx, { destinationAccountId, limit? })` — a recipient's transfer ledger (the earnings view, includes reinstatements), the read behind the `useEarnings` hook.
|
|
183
|
+
|
|
184
|
+
The underlying component queries already existed, but there was no client-side method to reach them, so an app couldn't wire the `useSplitBreakdown` / `useEarnings` hook factories to real data. These thin read wrappers close that gap (surfaced while building the affiliate-split demo, BTS-43).
|
|
185
|
+
|
|
186
|
+
- [#58](https://github.com/kellykampen/better-stripe/pull/58) [`61f755e`](https://github.com/kellykampen/better-stripe/commit/61f755ebf38065d5c3cc73db18e7dfd1c3d8c394) Thanks [@kellykampen](https://github.com/kellykampen)! - `updateDispute` now stages evidence by default instead of submitting it (BTS-61).
|
|
187
|
+
|
|
188
|
+
Stripe's dispute-update `submit` parameter **defaults to `true`**, so evidence sent without an explicit `submit` is submitted to the bank — a one-shot, outcome-affecting action. The previous docblock incorrectly said omitting `submit` "saves a draft", and the method forwarded `submit` only when explicitly set, so a caller following the docs would submit unintentionally.
|
|
189
|
+
|
|
190
|
+
**Behavior change:** when `evidence` is provided **without** an explicit `submit`, `updateDispute` now sends `submit: false` (stages a draft). Callers must pass `submit: true` to finalize and submit to the bank.
|
|
191
|
+
|
|
192
|
+
- A bare metadata/status update (no `evidence`) is unchanged — no `submit` is forced.
|
|
193
|
+
- An explicit `submit: true` / `submit: false` is always honored.
|
|
194
|
+
- `EvidenceForm` (BTS-54) already passes `submit` explicitly, so it is unaffected.
|
|
195
|
+
|
|
196
|
+
If you relied on the old behavior of submitting evidence by omitting `submit`, pass `submit: true` explicitly.
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Regenerate the component's `_generated` API so transfer/dispute queries are typed for consumers (BTS-70, [#71](https://github.com/kellykampen/better-stripe/issues/71)).
|
|
201
|
+
|
|
202
|
+
`src/component/_generated/component.ts` was stale — it predated `listTransfersByCharge`/`listTransfersByAccount` (BTS-50) and `getDisputeByStripeId`/`listDisputes` (BTS-31), so `components.betterStripe.connect.queries.*` for those methods was untyped for any consumer reaching into the raw component API. Regenerated via `npx convex codegen`; no source logic changed, generated bindings only.
|
|
203
|
+
|
|
204
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix: `updateDispute` now sends an explicit `submit: false` on every call, including metadata-only updates (BTS-72, [#67](https://github.com/kellykampen/better-stripe/issues/67)).
|
|
205
|
+
|
|
206
|
+
BTS-61 made evidence-bearing `updateDispute` calls stage by default (`submit: false`), but left metadata-only updates sending no `submit` key at all — inheriting Stripe's server-side default, which Stripe's docs state is `true` on every update. Empirically, a metadata-only update does not submit previously staged evidence today, but that leniency contradicts the documented default and submission is one-shot and outcome-affecting. `updateDispute` now never omits `submit`: every call — evidence, metadata, or both — sends an explicit `submit: false` unless the caller passes `submit: true` to finalize.
|
|
207
|
+
|
|
208
|
+
No public API change; the safer default only ever narrows behavior (no call that previously submitted now stages, and vice versa).
|
|
209
|
+
|
|
210
|
+
- [#68](https://github.com/kellykampen/better-stripe/pull/68) [`4d1b843`](https://github.com/kellykampen/better-stripe/commit/4d1b843cb9891a313c9b9a270ca067e36c686420) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix a first-invoice fee double-reversal crack (BTS-69).
|
|
211
|
+
|
|
212
|
+
`applyFirstInvoiceFee` recomputed the platform fee from **live** subscription metadata (`bsFeeConfig`) on every webhook retry. If the transfer reversal succeeded but the `bsFeeCollected` invoice-marker write then failed (event marked `failed`), and the platform edited `bsFeeConfig` before Stripe redelivered, a retry landing **after** Stripe's ≤24h idempotency-key window would recompute a _different_ fee and create a **second** reversal — double-collecting the fee.
|
|
213
|
+
|
|
214
|
+
**Fix:** before reversing, `applyFirstInvoiceFee` now lists the destination transfer's existing reversals and adopts one tagged `metadata.bsFeeFor:<invoiceId>` as the idempotency source of truth. That tag survives both the marker-write failure and the idempotency-key TTL, so a retry re-records the marker with the already-reversed amount instead of reversing again — mirroring BTS-60's frozen-config guarantee. No API surface change.
|
|
215
|
+
|
|
216
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix: collect the fixed/tier platform fee on a subscription's first invoice (BTS-68, [#52](https://github.com/kellykampen/better-stripe/issues/52)).
|
|
217
|
+
|
|
218
|
+
`applyPerInvoiceFee` (BTS-51) applies a fixed/tier `application_fee_amount` at `invoice.created`, which only works while the invoice is still a draft. Stripe finalizes a `charge_automatically` subscription's first invoice synchronously at creation (and Checkout subscription-mode pays it during checkout), so `invoice.created` fires with an already-`open` invoice — the update is silently rejected and the first cycle's platform fee was lost on every destination-charge subscription with a fixed/tier fee. Percent-only fees and renewal invoices (which get Stripe's ~1h draft window) were unaffected.
|
|
219
|
+
|
|
220
|
+
Fixed with a new `applyFirstInvoiceFee` processor hooked at `invoice.paid`: it collects the missed fee via a partial reversal of the automatic destination transfer, sized from `amount_paid` — the same mechanism BTS-60's `applyPerChargeFee` uses for one-time charges. Skips any invoice whose fee the draft path already collected, so there's no double-collection. No public API change.
|
|
221
|
+
|
|
222
|
+
- [#21](https://github.com/kellykampen/better-stripe/pull/21) [`1f43345`](https://github.com/kellykampen/better-stripe/commit/1f433459ec6eb11d75982f1ed883cff9414d4e15) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix `createPrice` orphaning a Stripe price when the product is missing from the component DB (BTS-2).
|
|
223
|
+
|
|
224
|
+
`createPrice` previously called `stripe.prices.create(...)` **before** verifying the product existed in the component DB, then threw `PRODUCT_NOT_FOUND` afterward — leaving an orphaned price in Stripe with no corresponding component record. The product lookup now runs **first**, so a missing/unsynced product throws before any Stripe write happens. No API change; behavior only differs on the error path.
|
|
225
|
+
|
|
226
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix: collect deferred `per_charge` platform fees via transfer reversal (BTS-60, [#38](https://github.com/kellykampen/better-stripe/issues/38)).
|
|
227
|
+
|
|
228
|
+
`bsFeeMode="per_charge"` (used when a one-time destination charge's final amount isn't known up front — discounts, `custom_unit_amount` prices, or a `sessionOverrides`-replaced `line_items`) had no webhook consumer, so the fixed/tiered platform fee was silently never collected on those charges.
|
|
229
|
+
|
|
230
|
+
Fixed with a new `applyPerChargeFee` processor at `payment_intent.succeeded`: it collects the fee the same way Stripe itself settles application fees on destination charges — a partial reversal of the automatic destination transfer, sized by `computeFee` from the amount actually charged (`amount_received`). No public API change; charges that already pass `amount` up front (computing `application_fee_amount` at session creation) are unaffected.
|
|
231
|
+
|
|
232
|
+
- [#66](https://github.com/kellykampen/better-stripe/pull/66) [`a47d64d`](https://github.com/kellykampen/better-stripe/commit/a47d64d39ece42b4cc0d96508e9b87925c6bf8e9) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix `addRecipientConfiguration` not persisting `appliedConfigurations` to the component DB (BTS-71).
|
|
233
|
+
|
|
234
|
+
`addRecipientConfiguration` applied the V2 recipient configuration on Stripe but never wrote the result back to the component `accounts` row, unlike `addCustomerConfiguration` which re-fetches and records `applied_configurations` after every update. Callers had to manually run `syncAllAccounts` afterward to reconcile the component DB, leaving it stale in between — anything reading `appliedConfigurations` off the component row (e.g. billing-view/UI gating) saw an out-of-date picture. `addRecipientConfiguration` now follows the same pattern: re-fetch the account after the Stripe update, read `applied_configurations`, recover the owning `userId` from the existing component record (failing closed with `ACCOUNT_NOT_FOUND` if the account isn't in the component DB yet), and `upsertAccount`. No public API change on the call side; the return shape now includes `appliedConfigurations` alongside `success`, matching `addCustomerConfiguration`.
|
|
235
|
+
|
|
236
|
+
- [#76](https://github.com/kellykampen/better-stripe/pull/76) [`c9f1489`](https://github.com/kellykampen/better-stripe/commit/c9f148948f2f5ea77f343c5fc1a78faffbb5ac1e) Thanks [@kellykampen](https://github.com/kellykampen)! - Fix three transfer-reversal money races via atomic reversal-slice claiming (BTS-63, [#61](https://github.com/kellykampen/better-stripe/issues/61)).
|
|
237
|
+
|
|
238
|
+
- Dispute clawback (amount mode): a retry after partial success recomputed per-leg amounts from mutable ledger state — a same-params replay could double-record the ledger, or a shifted remainder could resend different params under an already-used Stripe idempotency key, causing a permanent event-retry loop.
|
|
239
|
+
- Refund clawback (delta-to-target, BTS-34): two distinct refunds racing between the ledger read and the Stripe call could both compute the same reversal target from stale state, over-reversing a leg and under-recording the ledger.
|
|
240
|
+
- `payment_intent.succeeded` redelivery could have `upsertPayment`'s blanket patch rewrite `feeCollectedAmount` back to the gross fee, bypassing the monotonic fee-refund guard.
|
|
241
|
+
|
|
242
|
+
Fixed by claiming the exact reversal slice atomically, in a new component mutation, before any money moves — so a retry re-adopts the already-claimed slice instead of recomputing and re-reversing it. No public API change.
|
|
243
|
+
|
|
244
|
+
## 0.3.0
|
|
245
|
+
|
|
246
|
+
### Minor Changes
|
|
247
|
+
|
|
248
|
+
- [#16](https://github.com/kellykampen/better-stripe/pull/16) [`2fdbdf3`](https://github.com/kellykampen/better-stripe/commit/2fdbdf3ae2da75cb510d767e8e8787a5bab06d8b) Thanks [@kellykampen](https://github.com/kellykampen)! - Simplify webhook handler registration: replace the 18-export `triggersApi()` with a single `stripe.webhookHandlers()` returning a `{ syncWebhook, asyncWebhook }` pair, wired via `registerRoutes(..., { webhooks: internal.stripe })`.
|
|
249
|
+
|
|
250
|
+
**Breaking (pre-1.0):** `triggersApi()` is removed. The `triggers` (sync, same-transaction) and `hooks` (async, after-commit) constructor shape is unchanged — only the wiring collapses from 18 named refs to 2. Migrate:
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
// before
|
|
254
|
+
export const { accountUpserted, /* …16 more… */ afterPayoutCompleted } =
|
|
255
|
+
stripe.triggersApi();
|
|
256
|
+
registerRoutes(http, components.betterStripe, {
|
|
257
|
+
...secrets,
|
|
258
|
+
triggers: internal.stripe,
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// after
|
|
262
|
+
export const { syncWebhook, asyncWebhook } = stripe.webhookHandlers();
|
|
263
|
+
registerRoutes(http, components.betterStripe, {
|
|
264
|
+
...secrets,
|
|
265
|
+
webhooks: internal.stripe,
|
|
266
|
+
});
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Also: `STRIPE_SECRET_KEY` is now declared (required) in the component's `convex.config.ts`, so Convex validates its presence at push time; the installing app wires it via `app.use(..., { env: { STRIPE_SECRET_KEY: app.env.STRIPE_SECRET_KEY } })`.
|
|
270
|
+
|
|
271
|
+
<!--
|
|
272
|
+
This file is maintained by Changesets — do not hand-edit released sections.
|
|
273
|
+
To record a change, run `pnpm changeset` and commit the generated file in
|
|
274
|
+
`.changeset/`. New version sections are prepended above by `changeset version`
|
|
275
|
+
(run automatically in the "Version Packages" PR). History below 0.3.0 was
|
|
276
|
+
written by hand before Changesets was adopted.
|
|
277
|
+
-->
|
|
278
|
+
|
|
279
|
+
## 0.2.0 — 2026-06-11
|
|
280
|
+
|
|
281
|
+
### Breaking
|
|
282
|
+
|
|
283
|
+
- Trigger system is now wired into webhook processing. `triggersApi()` no longer returns `on*`/`after*` wrappers keyed by event; it returns 9 sync dispatchers (`accountUpserted`, `productUpserted`, `priceUpserted`, `subscriptionUpserted`, `subscriptionDeleted`, `checkoutSessionUpserted`, `invoiceUpserted`, `paymentUpserted`, `payoutUpserted`) plus 9 async hook wrappers (`afterAccountUpdated`, `afterCheckoutCompleted`, `afterSubscriptionUpdated`, `afterSubscriptionCanceled`, `afterTrialEnding`, `afterInvoicePaid`, `afterPaymentSucceeded`, `afterPaymentFailed`, `afterPayoutCompleted`). Each dispatcher performs the component upsert and the configured sync trigger in one transaction; `after*` hooks are scheduled via `ctx.scheduler` after the event is marked processed.
|
|
284
|
+
- Migration: export all 18 names from a Convex module and pass it to `registerRoutes` via the new `triggers` config (`triggers: internal.stripe`, no cast needed). See the README Quick Start.
|
|
285
|
+
- `listPayouts` filter renamed `accountId` → `stripeAccountId`, with new optional `status` and `limit` filters.
|
|
286
|
+
|
|
287
|
+
### Added
|
|
288
|
+
|
|
289
|
+
- `getInvoice` / `getInvoiceByStripeId` client query methods, plus `getInvoiceByStripeId`, `getPaymentByStripeId`, and `getPayoutByStripeId` component queries.
|
|
290
|
+
- `createAccountSession` for Stripe Connect embedded account management (throws structured `ConvexError(BetterStripeError)` on failure).
|
|
291
|
+
- `customer.subscription.trial_will_end` webhook support (fires the `onTrialEnding` async hook); V1 event constant list grows to 20 events (32 total).
|
|
292
|
+
- Account-scoped listing: `listSubscriptions` now accepts `{ stripeAccountId?, status?, limit? }` and `listInvoices` accepts `stripeAccountId`; new `accountId` indexes on `checkoutSessions`, `invoices`, and `payments`.
|
|
293
|
+
- `TriggerApiRefs` type and `triggers` field on `RegisterRoutesConfig`.
|
|
294
|
+
- React: `countryPlaceholder` i18n prop on `AccountCreateCard`.
|
|
295
|
+
- Example app: trigger dispatchers wired into `registerRoutes`; billing portal session created via a component-backed action.
|
|
296
|
+
- Example app: automated E2E webhook test harness (`npm run e2e:webhooks`) — fires real Stripe-signed events via `stripe trigger`/`stripe listen` against the deployed endpoint and asserts the ledger plus a new `triggerLog` table that records every sync-trigger/async-hook invocation (sync triggers write in the same transaction as the dispatcher).
|
|
297
|
+
|
|
298
|
+
### Fixed
|
|
299
|
+
|
|
300
|
+
- V2 thin-event verification was broken under stripe-node v22: `webhooks.constructEventAsync` rejects thin payloads after verifying the signature, so every correctly signed `v2.core.*` event was returned a 400. `verifyV2Event` now uses `stripe.parseEventNotificationAsync`.
|
|
301
|
+
- Failed webhook ledger events are reprocessed on Stripe retry instead of deduplicating forever; sync-trigger failures roll back the component upsert and return 500 so Stripe retries.
|
|
302
|
+
- Async hooks now run after the upsert transaction commits, with the committed doc.
|
|
303
|
+
- React rules-of-hooks violations: `useQuery` is always called, using Convex's `"skip"` sentinel in 6 conditional read hooks.
|
|
304
|
+
- React: `AddCardForm` tracks real processing/error state; `BillingPortalLink` tracks async loading state.
|
|
305
|
+
- `clearAllTables` now also clears the `webhookEvents` ledger.
|
|
306
|
+
- `getTrialStatus` trial fields derived from shared subscription fields.
|
|
307
|
+
|
|
308
|
+
### Changed
|
|
309
|
+
|
|
310
|
+
- Component return validators fully typed — 30 `v.any()` return validators replaced across core, products, billing, connect, and webhooks; client status unions narrowed and `as any` casts dropped.
|
|
311
|
+
- Stripe API version pin upgraded to `2026-05-27.dahlia`; dependencies bumped (convex 1.41, stripe-js 9.8, react-router 7.17).
|
|
312
|
+
|
|
313
|
+
## 0.1.0
|
|
314
|
+
|
|
315
|
+
- Initial extraction from Dojo monorepo
|
|
316
|
+
- Stripe V2 Accounts API support
|
|
317
|
+
- Webhook handling (V1 snapshot + V2 thin events)
|
|
318
|
+
- Full CRUD for accounts, products, prices, subscriptions, checkout sessions, invoices, payments, payouts
|