stripe
Version:
Stripe API wrapper
1,632 lines (1,374 loc) • 128 kB
TypeScript
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
export type Event =
| AccountApplicationAuthorizedEvent
| AccountApplicationDeauthorizedEvent
| AccountExternalAccountCreatedEvent
| AccountExternalAccountDeletedEvent
| AccountExternalAccountUpdatedEvent
| AccountUpdatedEvent
| ApplicationFeeCreatedEvent
| ApplicationFeeRefundUpdatedEvent
| ApplicationFeeRefundedEvent
| BalanceAvailableEvent
| BalanceSettingsUpdatedEvent
| BillingAlertTriggeredEvent
| BillingCreditBalanceTransactionCreatedEvent
| BillingCreditGrantCreatedEvent
| BillingCreditGrantUpdatedEvent
| BillingMeterCreatedEvent
| BillingMeterDeactivatedEvent
| BillingMeterReactivatedEvent
| BillingMeterUpdatedEvent
| BillingPortalConfigurationCreatedEvent
| BillingPortalConfigurationUpdatedEvent
| BillingPortalSessionCreatedEvent
| CapabilityUpdatedEvent
| CashBalanceFundsAvailableEvent
| ChargeCapturedEvent
| ChargeDisputeClosedEvent
| ChargeDisputeCreatedEvent
| ChargeDisputeFundsReinstatedEvent
| ChargeDisputeFundsWithdrawnEvent
| ChargeDisputeUpdatedEvent
| ChargeExpiredEvent
| ChargeFailedEvent
| ChargePendingEvent
| ChargeRefundUpdatedEvent
| ChargeRefundedEvent
| ChargeSucceededEvent
| ChargeUpdatedEvent
| CheckoutSessionAsyncPaymentFailedEvent
| CheckoutSessionAsyncPaymentSucceededEvent
| CheckoutSessionCompletedEvent
| CheckoutSessionExpiredEvent
| ClimateOrderCanceledEvent
| ClimateOrderCreatedEvent
| ClimateOrderDelayedEvent
| ClimateOrderDeliveredEvent
| ClimateOrderProductSubstitutedEvent
| ClimateProductCreatedEvent
| ClimateProductPricingUpdatedEvent
| CouponCreatedEvent
| CouponDeletedEvent
| CouponUpdatedEvent
| CreditNoteCreatedEvent
| CreditNoteUpdatedEvent
| CreditNoteVoidedEvent
| CustomerCreatedEvent
| CustomerDeletedEvent
| CustomerDiscountCreatedEvent
| CustomerDiscountDeletedEvent
| CustomerDiscountUpdatedEvent
| CustomerSourceCreatedEvent
| CustomerSourceDeletedEvent
| CustomerSourceExpiringEvent
| CustomerSourceUpdatedEvent
| CustomerSubscriptionCreatedEvent
| CustomerSubscriptionDeletedEvent
| CustomerSubscriptionPausedEvent
| CustomerSubscriptionPendingUpdateAppliedEvent
| CustomerSubscriptionPendingUpdateExpiredEvent
| CustomerSubscriptionResumedEvent
| CustomerSubscriptionTrialWillEndEvent
| CustomerSubscriptionUpdatedEvent
| CustomerTaxIdCreatedEvent
| CustomerTaxIdDeletedEvent
| CustomerTaxIdUpdatedEvent
| CustomerUpdatedEvent
| CustomerCashBalanceTransactionCreatedEvent
| EntitlementsActiveEntitlementSummaryUpdatedEvent
| FileCreatedEvent
| FinancialConnectionsAccountAccountNumbersUpdatedEvent
| FinancialConnectionsAccountCreatedEvent
| FinancialConnectionsAccountDeactivatedEvent
| FinancialConnectionsAccountDisconnectedEvent
| FinancialConnectionsAccountReactivatedEvent
| FinancialConnectionsAccountRefreshedBalanceEvent
| FinancialConnectionsAccountRefreshedOwnershipEvent
| FinancialConnectionsAccountRefreshedTransactionsEvent
| FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent
| IdentityVerificationSessionCanceledEvent
| IdentityVerificationSessionCreatedEvent
| IdentityVerificationSessionProcessingEvent
| IdentityVerificationSessionRedactedEvent
| IdentityVerificationSessionRequiresInputEvent
| IdentityVerificationSessionVerifiedEvent
| InvoiceCreatedEvent
| InvoiceDeletedEvent
| InvoiceFinalizationFailedEvent
| InvoiceFinalizedEvent
| InvoiceMarkedUncollectibleEvent
| InvoiceOverdueEvent
| InvoiceOverpaidEvent
| InvoicePaidEvent
| InvoicePaymentActionRequiredEvent
| InvoicePaymentAttemptRequiredEvent
| InvoicePaymentFailedEvent
| InvoicePaymentSucceededEvent
| InvoiceSentEvent
| InvoiceUpcomingEvent
| InvoiceUpdatedEvent
| InvoiceVoidedEvent
| InvoiceWillBeDueEvent
| InvoicePaymentPaidEvent
| InvoiceItemCreatedEvent
| InvoiceItemDeletedEvent
| IssuingAuthorizationCreatedEvent
| IssuingAuthorizationRequestEvent
| IssuingAuthorizationUpdatedEvent
| IssuingCardCreatedEvent
| IssuingCardUpdatedEvent
| IssuingCardholderCreatedEvent
| IssuingCardholderUpdatedEvent
| IssuingDisputeClosedEvent
| IssuingDisputeCreatedEvent
| IssuingDisputeFundsReinstatedEvent
| IssuingDisputeFundsRescindedEvent
| IssuingDisputeSubmittedEvent
| IssuingDisputeUpdatedEvent
| IssuingPersonalizationDesignActivatedEvent
| IssuingPersonalizationDesignDeactivatedEvent
| IssuingPersonalizationDesignRejectedEvent
| IssuingPersonalizationDesignUpdatedEvent
| IssuingTokenCreatedEvent
| IssuingTokenUpdatedEvent
| IssuingTransactionCreatedEvent
| IssuingTransactionPurchaseDetailsReceiptUpdatedEvent
| IssuingTransactionUpdatedEvent
| MandateUpdatedEvent
| PaymentIntentAmountCapturableUpdatedEvent
| PaymentIntentCanceledEvent
| PaymentIntentCreatedEvent
| PaymentIntentPartiallyFundedEvent
| PaymentIntentPaymentFailedEvent
| PaymentIntentProcessingEvent
| PaymentIntentRequiresActionEvent
| PaymentIntentSucceededEvent
| PaymentLinkCreatedEvent
| PaymentLinkUpdatedEvent
| PaymentMethodAttachedEvent
| PaymentMethodAutomaticallyUpdatedEvent
| PaymentMethodDetachedEvent
| PaymentMethodUpdatedEvent
| PayoutCanceledEvent
| PayoutCreatedEvent
| PayoutFailedEvent
| PayoutPaidEvent
| PayoutReconciliationCompletedEvent
| PayoutUpdatedEvent
| PersonCreatedEvent
| PersonDeletedEvent
| PersonUpdatedEvent
| PlanCreatedEvent
| PlanDeletedEvent
| PlanUpdatedEvent
| PriceCreatedEvent
| PriceDeletedEvent
| PriceUpdatedEvent
| ProductCreatedEvent
| ProductDeletedEvent
| ProductUpdatedEvent
| PromotionCodeCreatedEvent
| PromotionCodeUpdatedEvent
| QuoteAcceptedEvent
| QuoteCanceledEvent
| QuoteCreatedEvent
| QuoteFinalizedEvent
| RadarEarlyFraudWarningCreatedEvent
| RadarEarlyFraudWarningUpdatedEvent
| RefundCreatedEvent
| RefundFailedEvent
| RefundUpdatedEvent
| ReportingReportRunFailedEvent
| ReportingReportRunSucceededEvent
| ReportingReportTypeUpdatedEvent
| ReviewClosedEvent
| ReviewOpenedEvent
| SetupIntentCanceledEvent
| SetupIntentCreatedEvent
| SetupIntentRequiresActionEvent
| SetupIntentSetupFailedEvent
| SetupIntentSucceededEvent
| SigmaScheduledQueryRunCreatedEvent
| SourceCanceledEvent
| SourceChargeableEvent
| SourceFailedEvent
| SourceMandateNotificationEvent
| SourceRefundAttributesRequiredEvent
| SourceTransactionCreatedEvent
| SourceTransactionUpdatedEvent
| SubscriptionScheduleAbortedEvent
| SubscriptionScheduleCanceledEvent
| SubscriptionScheduleCompletedEvent
| SubscriptionScheduleCreatedEvent
| SubscriptionScheduleExpiringEvent
| SubscriptionScheduleReleasedEvent
| SubscriptionScheduleUpdatedEvent
| TaxSettingsUpdatedEvent
| TaxRateCreatedEvent
| TaxRateUpdatedEvent
| TerminalReaderActionFailedEvent
| TerminalReaderActionSucceededEvent
| TerminalReaderActionUpdatedEvent
| TestHelpersTestClockAdvancingEvent
| TestHelpersTestClockCreatedEvent
| TestHelpersTestClockDeletedEvent
| TestHelpersTestClockInternalFailureEvent
| TestHelpersTestClockReadyEvent
| TopupCanceledEvent
| TopupCreatedEvent
| TopupFailedEvent
| TopupReversedEvent
| TopupSucceededEvent
| TransferCreatedEvent
| TransferReversedEvent
| TransferUpdatedEvent
| TreasuryCreditReversalCreatedEvent
| TreasuryCreditReversalPostedEvent
| TreasuryDebitReversalCompletedEvent
| TreasuryDebitReversalCreatedEvent
| TreasuryDebitReversalInitialCreditGrantedEvent
| TreasuryFinancialAccountClosedEvent
| TreasuryFinancialAccountCreatedEvent
| TreasuryFinancialAccountFeaturesStatusUpdatedEvent
| TreasuryInboundTransferCanceledEvent
| TreasuryInboundTransferCreatedEvent
| TreasuryInboundTransferFailedEvent
| TreasuryInboundTransferSucceededEvent
| TreasuryOutboundPaymentCanceledEvent
| TreasuryOutboundPaymentCreatedEvent
| TreasuryOutboundPaymentExpectedArrivalDateUpdatedEvent
| TreasuryOutboundPaymentFailedEvent
| TreasuryOutboundPaymentPostedEvent
| TreasuryOutboundPaymentReturnedEvent
| TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
| TreasuryOutboundTransferCanceledEvent
| TreasuryOutboundTransferCreatedEvent
| TreasuryOutboundTransferExpectedArrivalDateUpdatedEvent
| TreasuryOutboundTransferFailedEvent
| TreasuryOutboundTransferPostedEvent
| TreasuryOutboundTransferReturnedEvent
| TreasuryOutboundTransferTrackingDetailsUpdatedEvent
| TreasuryReceivedCreditCreatedEvent
| TreasuryReceivedCreditFailedEvent
| TreasuryReceivedCreditSucceededEvent
| TreasuryReceivedDebitCreatedEvent;
}
namespace Stripe {
/**
* Occurs whenever a user authorizes an application. Sent to the related application only.
*/
interface AccountApplicationAuthorizedEvent extends EventBase {
type: 'account.application.authorized';
data: AccountApplicationAuthorizedEvent.Data;
}
namespace AccountApplicationAuthorizedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Application;
previous_attributes?: Partial<Stripe.Application>;
}
}
/**
* Occurs whenever a user deauthorizes an application. Sent to the related application only.
*/
interface AccountApplicationDeauthorizedEvent extends EventBase {
type: 'account.application.deauthorized';
data: AccountApplicationDeauthorizedEvent.Data;
}
namespace AccountApplicationDeauthorizedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Application;
previous_attributes?: Partial<Stripe.Application>;
}
}
/**
* Occurs whenever an external account is created.
*/
interface AccountExternalAccountCreatedEvent extends EventBase {
type: 'account.external_account.created';
data: AccountExternalAccountCreatedEvent.Data;
}
namespace AccountExternalAccountCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.ExternalAccount;
previous_attributes?: Partial<Stripe.ExternalAccount>;
}
}
/**
* Occurs whenever an external account is deleted.
*/
interface AccountExternalAccountDeletedEvent extends EventBase {
type: 'account.external_account.deleted';
data: AccountExternalAccountDeletedEvent.Data;
}
namespace AccountExternalAccountDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.ExternalAccount;
previous_attributes?: Partial<Stripe.ExternalAccount>;
}
}
/**
* Occurs whenever an external account is updated.
*/
interface AccountExternalAccountUpdatedEvent extends EventBase {
type: 'account.external_account.updated';
data: AccountExternalAccountUpdatedEvent.Data;
}
namespace AccountExternalAccountUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.ExternalAccount;
previous_attributes?: Partial<Stripe.ExternalAccount>;
}
}
/**
* Occurs whenever an account status or property has changed.
*/
interface AccountUpdatedEvent extends EventBase {
type: 'account.updated';
data: AccountUpdatedEvent.Data;
}
namespace AccountUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Account;
previous_attributes?: Partial<Stripe.Account>;
}
}
/**
* Occurs whenever an application fee is created on a charge.
*/
interface ApplicationFeeCreatedEvent extends EventBase {
type: 'application_fee.created';
data: ApplicationFeeCreatedEvent.Data;
}
namespace ApplicationFeeCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.ApplicationFee;
previous_attributes?: Partial<Stripe.ApplicationFee>;
}
}
/**
* Occurs whenever an application fee refund is updated.
*/
interface ApplicationFeeRefundUpdatedEvent extends EventBase {
type: 'application_fee.refund.updated';
data: ApplicationFeeRefundUpdatedEvent.Data;
}
namespace ApplicationFeeRefundUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FeeRefund;
previous_attributes?: Partial<Stripe.FeeRefund>;
}
}
/**
* Occurs whenever an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](#fee_refunds). This includes partial refunds.
*/
interface ApplicationFeeRefundedEvent extends EventBase {
type: 'application_fee.refunded';
data: ApplicationFeeRefundedEvent.Data;
}
namespace ApplicationFeeRefundedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.ApplicationFee;
previous_attributes?: Partial<Stripe.ApplicationFee>;
}
}
/**
* Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions.
*/
interface BalanceAvailableEvent extends EventBase {
type: 'balance.available';
data: BalanceAvailableEvent.Data;
}
namespace BalanceAvailableEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Balance;
previous_attributes?: Partial<Stripe.Balance>;
}
}
/**
* Occurs whenever a balance settings status or property has changed.
*/
interface BalanceSettingsUpdatedEvent extends EventBase {
type: 'balance_settings.updated';
data: BalanceSettingsUpdatedEvent.Data;
}
namespace BalanceSettingsUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.BalanceSettings;
previous_attributes?: Partial<Stripe.BalanceSettings>;
}
}
/**
* Occurs whenever your custom alert threshold is met.
*/
interface BillingAlertTriggeredEvent extends EventBase {
type: 'billing.alert.triggered';
data: BillingAlertTriggeredEvent.Data;
}
namespace BillingAlertTriggeredEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.AlertTriggered;
previous_attributes?: Partial<Stripe.Billing.AlertTriggered>;
}
}
/**
* Occurs when a credit balance transaction is created
*/
interface BillingCreditBalanceTransactionCreatedEvent extends EventBase {
type: 'billing.credit_balance_transaction.created';
data: BillingCreditBalanceTransactionCreatedEvent.Data;
}
namespace BillingCreditBalanceTransactionCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.CreditBalanceTransaction;
previous_attributes?: Partial<Stripe.Billing.CreditBalanceTransaction>;
}
}
/**
* Occurs when a credit grant is created
*/
interface BillingCreditGrantCreatedEvent extends EventBase {
type: 'billing.credit_grant.created';
data: BillingCreditGrantCreatedEvent.Data;
}
namespace BillingCreditGrantCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.CreditGrant;
previous_attributes?: Partial<Stripe.Billing.CreditGrant>;
}
}
/**
* Occurs when a credit grant is updated
*/
interface BillingCreditGrantUpdatedEvent extends EventBase {
type: 'billing.credit_grant.updated';
data: BillingCreditGrantUpdatedEvent.Data;
}
namespace BillingCreditGrantUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.CreditGrant;
previous_attributes?: Partial<Stripe.Billing.CreditGrant>;
}
}
/**
* Occurs when a meter is created
*/
interface BillingMeterCreatedEvent extends EventBase {
type: 'billing.meter.created';
data: BillingMeterCreatedEvent.Data;
}
namespace BillingMeterCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.Meter;
previous_attributes?: Partial<Stripe.Billing.Meter>;
}
}
/**
* Occurs when a meter is deactivated
*/
interface BillingMeterDeactivatedEvent extends EventBase {
type: 'billing.meter.deactivated';
data: BillingMeterDeactivatedEvent.Data;
}
namespace BillingMeterDeactivatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.Meter;
previous_attributes?: Partial<Stripe.Billing.Meter>;
}
}
/**
* Occurs when a meter is reactivated
*/
interface BillingMeterReactivatedEvent extends EventBase {
type: 'billing.meter.reactivated';
data: BillingMeterReactivatedEvent.Data;
}
namespace BillingMeterReactivatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.Meter;
previous_attributes?: Partial<Stripe.Billing.Meter>;
}
}
/**
* Occurs when a meter is updated
*/
interface BillingMeterUpdatedEvent extends EventBase {
type: 'billing.meter.updated';
data: BillingMeterUpdatedEvent.Data;
}
namespace BillingMeterUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Billing.Meter;
previous_attributes?: Partial<Stripe.Billing.Meter>;
}
}
/**
* Occurs whenever a portal configuration is created.
*/
interface BillingPortalConfigurationCreatedEvent extends EventBase {
type: 'billing_portal.configuration.created';
data: BillingPortalConfigurationCreatedEvent.Data;
}
namespace BillingPortalConfigurationCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.BillingPortal.Configuration;
previous_attributes?: Partial<Stripe.BillingPortal.Configuration>;
}
}
/**
* Occurs whenever a portal configuration is updated.
*/
interface BillingPortalConfigurationUpdatedEvent extends EventBase {
type: 'billing_portal.configuration.updated';
data: BillingPortalConfigurationUpdatedEvent.Data;
}
namespace BillingPortalConfigurationUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.BillingPortal.Configuration;
previous_attributes?: Partial<Stripe.BillingPortal.Configuration>;
}
}
/**
* Occurs whenever a portal session is created.
*/
interface BillingPortalSessionCreatedEvent extends EventBase {
type: 'billing_portal.session.created';
data: BillingPortalSessionCreatedEvent.Data;
}
namespace BillingPortalSessionCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.BillingPortal.Session;
previous_attributes?: Partial<Stripe.BillingPortal.Session>;
}
}
/**
* Occurs whenever a capability has new requirements or a new status.
*/
interface CapabilityUpdatedEvent extends EventBase {
type: 'capability.updated';
data: CapabilityUpdatedEvent.Data;
}
namespace CapabilityUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Capability;
previous_attributes?: Partial<Stripe.Capability>;
}
}
/**
* Occurs whenever there is a positive remaining cash balance after Stripe automatically reconciles new funds into the cash balance. If you enabled manual reconciliation, this webhook will fire whenever there are new funds into the cash balance.
*/
interface CashBalanceFundsAvailableEvent extends EventBase {
type: 'cash_balance.funds_available';
data: CashBalanceFundsAvailableEvent.Data;
}
namespace CashBalanceFundsAvailableEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CashBalance;
previous_attributes?: Partial<Stripe.CashBalance>;
}
}
/**
* Occurs whenever a previously uncaptured charge is captured.
*/
interface ChargeCapturedEvent extends EventBase {
type: 'charge.captured';
data: ChargeCapturedEvent.Data;
}
namespace ChargeCapturedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`.
*/
interface ChargeDisputeClosedEvent extends EventBase {
type: 'charge.dispute.closed';
data: ChargeDisputeClosedEvent.Data;
}
namespace ChargeDisputeClosedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Dispute;
previous_attributes?: Partial<Stripe.Dispute>;
}
}
/**
* Occurs whenever a customer disputes a charge with their bank.
*/
interface ChargeDisputeCreatedEvent extends EventBase {
type: 'charge.dispute.created';
data: ChargeDisputeCreatedEvent.Data;
}
namespace ChargeDisputeCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Dispute;
previous_attributes?: Partial<Stripe.Dispute>;
}
}
/**
* Occurs when funds are reinstated to your account after a dispute is closed. This includes [partially refunded payments](https://docs.stripe.com/disputes#disputes-on-partially-refunded-payments).
*/
interface ChargeDisputeFundsReinstatedEvent extends EventBase {
type: 'charge.dispute.funds_reinstated';
data: ChargeDisputeFundsReinstatedEvent.Data;
}
namespace ChargeDisputeFundsReinstatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Dispute;
previous_attributes?: Partial<Stripe.Dispute>;
}
}
/**
* Occurs when funds are removed from your account due to a dispute.
*/
interface ChargeDisputeFundsWithdrawnEvent extends EventBase {
type: 'charge.dispute.funds_withdrawn';
data: ChargeDisputeFundsWithdrawnEvent.Data;
}
namespace ChargeDisputeFundsWithdrawnEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Dispute;
previous_attributes?: Partial<Stripe.Dispute>;
}
}
/**
* Occurs when the dispute is updated (usually with evidence).
*/
interface ChargeDisputeUpdatedEvent extends EventBase {
type: 'charge.dispute.updated';
data: ChargeDisputeUpdatedEvent.Data;
}
namespace ChargeDisputeUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Dispute;
previous_attributes?: Partial<Stripe.Dispute>;
}
}
/**
* Occurs whenever an uncaptured charge expires.
*/
interface ChargeExpiredEvent extends EventBase {
type: 'charge.expired';
data: ChargeExpiredEvent.Data;
}
namespace ChargeExpiredEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs whenever a failed charge attempt occurs.
*/
interface ChargeFailedEvent extends EventBase {
type: 'charge.failed';
data: ChargeFailedEvent.Data;
}
namespace ChargeFailedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs whenever a pending charge is created.
*/
interface ChargePendingEvent extends EventBase {
type: 'charge.pending';
data: ChargePendingEvent.Data;
}
namespace ChargePendingEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead.
*/
interface ChargeRefundUpdatedEvent extends EventBase {
type: 'charge.refund.updated';
data: ChargeRefundUpdatedEvent.Data;
}
namespace ChargeRefundUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Refund;
previous_attributes?: Partial<Stripe.Refund>;
}
}
/**
* Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund.
*/
interface ChargeRefundedEvent extends EventBase {
type: 'charge.refunded';
data: ChargeRefundedEvent.Data;
}
namespace ChargeRefundedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs whenever a charge is successful.
*/
interface ChargeSucceededEvent extends EventBase {
type: 'charge.succeeded';
data: ChargeSucceededEvent.Data;
}
namespace ChargeSucceededEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture.
*/
interface ChargeUpdatedEvent extends EventBase {
type: 'charge.updated';
data: ChargeUpdatedEvent.Data;
}
namespace ChargeUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Charge;
previous_attributes?: Partial<Stripe.Charge>;
}
}
/**
* Occurs when a payment intent using a delayed payment method fails.
*/
interface CheckoutSessionAsyncPaymentFailedEvent extends EventBase {
type: 'checkout.session.async_payment_failed';
data: CheckoutSessionAsyncPaymentFailedEvent.Data;
}
namespace CheckoutSessionAsyncPaymentFailedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Checkout.Session;
previous_attributes?: Partial<Stripe.Checkout.Session>;
}
}
/**
* Occurs when a payment intent using a delayed payment method finally succeeds.
*/
interface CheckoutSessionAsyncPaymentSucceededEvent extends EventBase {
type: 'checkout.session.async_payment_succeeded';
data: CheckoutSessionAsyncPaymentSucceededEvent.Data;
}
namespace CheckoutSessionAsyncPaymentSucceededEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Checkout.Session;
previous_attributes?: Partial<Stripe.Checkout.Session>;
}
}
/**
* Occurs when a Checkout Session has been successfully completed.
*/
interface CheckoutSessionCompletedEvent extends EventBase {
type: 'checkout.session.completed';
data: CheckoutSessionCompletedEvent.Data;
}
namespace CheckoutSessionCompletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Checkout.Session;
previous_attributes?: Partial<Stripe.Checkout.Session>;
}
}
/**
* Occurs when a Checkout Session is expired.
*/
interface CheckoutSessionExpiredEvent extends EventBase {
type: 'checkout.session.expired';
data: CheckoutSessionExpiredEvent.Data;
}
namespace CheckoutSessionExpiredEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Checkout.Session;
previous_attributes?: Partial<Stripe.Checkout.Session>;
}
}
/**
* Occurs when a Climate order is canceled.
*/
interface ClimateOrderCanceledEvent extends EventBase {
type: 'climate.order.canceled';
data: ClimateOrderCanceledEvent.Data;
}
namespace ClimateOrderCanceledEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Order;
previous_attributes?: Partial<Stripe.Climate.Order>;
}
}
/**
* Occurs when a Climate order is created.
*/
interface ClimateOrderCreatedEvent extends EventBase {
type: 'climate.order.created';
data: ClimateOrderCreatedEvent.Data;
}
namespace ClimateOrderCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Order;
previous_attributes?: Partial<Stripe.Climate.Order>;
}
}
/**
* Occurs when a Climate order is delayed.
*/
interface ClimateOrderDelayedEvent extends EventBase {
type: 'climate.order.delayed';
data: ClimateOrderDelayedEvent.Data;
}
namespace ClimateOrderDelayedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Order;
previous_attributes?: Partial<Stripe.Climate.Order>;
}
}
/**
* Occurs when a Climate order is delivered.
*/
interface ClimateOrderDeliveredEvent extends EventBase {
type: 'climate.order.delivered';
data: ClimateOrderDeliveredEvent.Data;
}
namespace ClimateOrderDeliveredEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Order;
previous_attributes?: Partial<Stripe.Climate.Order>;
}
}
/**
* Occurs when a Climate order's product is substituted for another.
*/
interface ClimateOrderProductSubstitutedEvent extends EventBase {
type: 'climate.order.product_substituted';
data: ClimateOrderProductSubstitutedEvent.Data;
}
namespace ClimateOrderProductSubstitutedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Order;
previous_attributes?: Partial<Stripe.Climate.Order>;
}
}
/**
* Occurs when a Climate product is created.
*/
interface ClimateProductCreatedEvent extends EventBase {
type: 'climate.product.created';
data: ClimateProductCreatedEvent.Data;
}
namespace ClimateProductCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Product;
previous_attributes?: Partial<Stripe.Climate.Product>;
}
}
/**
* Occurs when a Climate product is updated.
*/
interface ClimateProductPricingUpdatedEvent extends EventBase {
type: 'climate.product.pricing_updated';
data: ClimateProductPricingUpdatedEvent.Data;
}
namespace ClimateProductPricingUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Climate.Product;
previous_attributes?: Partial<Stripe.Climate.Product>;
}
}
/**
* Occurs whenever a coupon is created.
*/
interface CouponCreatedEvent extends EventBase {
type: 'coupon.created';
data: CouponCreatedEvent.Data;
}
namespace CouponCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Coupon;
previous_attributes?: Partial<Stripe.Coupon>;
}
}
/**
* Occurs whenever a coupon is deleted.
*/
interface CouponDeletedEvent extends EventBase {
type: 'coupon.deleted';
data: CouponDeletedEvent.Data;
}
namespace CouponDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Coupon;
previous_attributes?: Partial<Stripe.Coupon>;
}
}
/**
* Occurs whenever a coupon is updated.
*/
interface CouponUpdatedEvent extends EventBase {
type: 'coupon.updated';
data: CouponUpdatedEvent.Data;
}
namespace CouponUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Coupon;
previous_attributes?: Partial<Stripe.Coupon>;
}
}
/**
* Occurs whenever a credit note is created.
*/
interface CreditNoteCreatedEvent extends EventBase {
type: 'credit_note.created';
data: CreditNoteCreatedEvent.Data;
}
namespace CreditNoteCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CreditNote;
previous_attributes?: Partial<Stripe.CreditNote>;
}
}
/**
* Occurs whenever a credit note is updated.
*/
interface CreditNoteUpdatedEvent extends EventBase {
type: 'credit_note.updated';
data: CreditNoteUpdatedEvent.Data;
}
namespace CreditNoteUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CreditNote;
previous_attributes?: Partial<Stripe.CreditNote>;
}
}
/**
* Occurs whenever a credit note is voided.
*/
interface CreditNoteVoidedEvent extends EventBase {
type: 'credit_note.voided';
data: CreditNoteVoidedEvent.Data;
}
namespace CreditNoteVoidedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CreditNote;
previous_attributes?: Partial<Stripe.CreditNote>;
}
}
/**
* Occurs whenever a new customer is created.
*/
interface CustomerCreatedEvent extends EventBase {
type: 'customer.created';
data: CustomerCreatedEvent.Data;
}
namespace CustomerCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Customer;
previous_attributes?: Partial<Stripe.Customer>;
}
}
/**
* Occurs whenever a customer is deleted.
*/
interface CustomerDeletedEvent extends EventBase {
type: 'customer.deleted';
data: CustomerDeletedEvent.Data;
}
namespace CustomerDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Customer;
previous_attributes?: Partial<Stripe.Customer>;
}
}
/**
* Occurs whenever a coupon is attached to a customer.
*/
interface CustomerDiscountCreatedEvent extends EventBase {
type: 'customer.discount.created';
data: CustomerDiscountCreatedEvent.Data;
}
namespace CustomerDiscountCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Discount;
previous_attributes?: Partial<Stripe.Discount>;
}
}
/**
* Occurs whenever a coupon is removed from a customer.
*/
interface CustomerDiscountDeletedEvent extends EventBase {
type: 'customer.discount.deleted';
data: CustomerDiscountDeletedEvent.Data;
}
namespace CustomerDiscountDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Discount;
previous_attributes?: Partial<Stripe.Discount>;
}
}
/**
* Occurs whenever a customer is switched from one coupon to another.
*/
interface CustomerDiscountUpdatedEvent extends EventBase {
type: 'customer.discount.updated';
data: CustomerDiscountUpdatedEvent.Data;
}
namespace CustomerDiscountUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Discount;
previous_attributes?: Partial<Stripe.Discount>;
}
}
/**
* Occurs whenever a new source is created for a customer.
*/
interface CustomerSourceCreatedEvent extends EventBase {
type: 'customer.source.created';
data: CustomerSourceCreatedEvent.Data;
}
namespace CustomerSourceCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CustomerSource;
previous_attributes?: Partial<Stripe.CustomerSource>;
}
}
/**
* Occurs whenever a source is removed from a customer.
*/
interface CustomerSourceDeletedEvent extends EventBase {
type: 'customer.source.deleted';
data: CustomerSourceDeletedEvent.Data;
}
namespace CustomerSourceDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CustomerSource;
previous_attributes?: Partial<Stripe.CustomerSource>;
}
}
/**
* Occurs whenever a card or source will expire at the end of the month. This event only works with legacy integrations using Card or Source objects. If you use the PaymentMethod API, this event won't occur.
*/
interface CustomerSourceExpiringEvent extends EventBase {
type: 'customer.source.expiring';
data: CustomerSourceExpiringEvent.Data;
}
namespace CustomerSourceExpiringEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CustomerSource;
previous_attributes?: Partial<Stripe.CustomerSource>;
}
}
/**
* Occurs whenever a source's details are changed.
*/
interface CustomerSourceUpdatedEvent extends EventBase {
type: 'customer.source.updated';
data: CustomerSourceUpdatedEvent.Data;
}
namespace CustomerSourceUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CustomerSource;
previous_attributes?: Partial<Stripe.CustomerSource>;
}
}
/**
* Occurs whenever a customer is signed up for a new plan.
*/
interface CustomerSubscriptionCreatedEvent extends EventBase {
type: 'customer.subscription.created';
data: CustomerSubscriptionCreatedEvent.Data;
}
namespace CustomerSubscriptionCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a customer's subscription ends.
*/
interface CustomerSubscriptionDeletedEvent extends EventBase {
type: 'customer.subscription.deleted';
data: CustomerSubscriptionDeletedEvent.Data;
}
namespace CustomerSubscriptionDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a customer's subscription is paused. Only applies when subscriptions enter `status=paused`, not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is paused.
*/
interface CustomerSubscriptionPausedEvent extends EventBase {
type: 'customer.subscription.paused';
data: CustomerSubscriptionPausedEvent.Data;
}
namespace CustomerSubscriptionPausedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a customer's subscription's pending update is applied, and the subscription is updated.
*/
interface CustomerSubscriptionPendingUpdateAppliedEvent extends EventBase {
type: 'customer.subscription.pending_update_applied';
data: CustomerSubscriptionPendingUpdateAppliedEvent.Data;
}
namespace CustomerSubscriptionPendingUpdateAppliedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a customer's subscription's pending update expires before the related invoice is paid.
*/
interface CustomerSubscriptionPendingUpdateExpiredEvent extends EventBase {
type: 'customer.subscription.pending_update_expired';
data: CustomerSubscriptionPendingUpdateExpiredEvent.Data;
}
namespace CustomerSubscriptionPendingUpdateExpiredEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a customer's subscription is no longer paused. Only applies when a `status=paused` subscription is [resumed](https://docs.stripe.com/api/subscriptions/resume), not when [payment collection](https://docs.stripe.com/billing/subscriptions/pause) is resumed.
*/
interface CustomerSubscriptionResumedEvent extends EventBase {
type: 'customer.subscription.resumed';
data: CustomerSubscriptionResumedEvent.Data;
}
namespace CustomerSubscriptionResumedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs three days before a subscription's trial period is scheduled to end, or when a trial is ended immediately (using `trial_end=now`).
*/
interface CustomerSubscriptionTrialWillEndEvent extends EventBase {
type: 'customer.subscription.trial_will_end';
data: CustomerSubscriptionTrialWillEndEvent.Data;
}
namespace CustomerSubscriptionTrialWillEndEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).
*/
interface CustomerSubscriptionUpdatedEvent extends EventBase {
type: 'customer.subscription.updated';
data: CustomerSubscriptionUpdatedEvent.Data;
}
namespace CustomerSubscriptionUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Subscription;
previous_attributes?: Partial<Stripe.Subscription>;
}
}
/**
* Occurs whenever a tax ID is created for a customer.
*/
interface CustomerTaxIdCreatedEvent extends EventBase {
type: 'customer.tax_id.created';
data: CustomerTaxIdCreatedEvent.Data;
}
namespace CustomerTaxIdCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.TaxId;
previous_attributes?: Partial<Stripe.TaxId>;
}
}
/**
* Occurs whenever a tax ID is deleted from a customer.
*/
interface CustomerTaxIdDeletedEvent extends EventBase {
type: 'customer.tax_id.deleted';
data: CustomerTaxIdDeletedEvent.Data;
}
namespace CustomerTaxIdDeletedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.TaxId;
previous_attributes?: Partial<Stripe.TaxId>;
}
}
/**
* Occurs whenever a customer's tax ID is updated.
*/
interface CustomerTaxIdUpdatedEvent extends EventBase {
type: 'customer.tax_id.updated';
data: CustomerTaxIdUpdatedEvent.Data;
}
namespace CustomerTaxIdUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.TaxId;
previous_attributes?: Partial<Stripe.TaxId>;
}
}
/**
* Occurs whenever any property of a customer changes.
*/
interface CustomerUpdatedEvent extends EventBase {
type: 'customer.updated';
data: CustomerUpdatedEvent.Data;
}
namespace CustomerUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Customer;
previous_attributes?: Partial<Stripe.Customer>;
}
}
/**
* Occurs whenever a new customer cash balance transactions is created.
*/
interface CustomerCashBalanceTransactionCreatedEvent extends EventBase {
type: 'customer_cash_balance_transaction.created';
data: CustomerCashBalanceTransactionCreatedEvent.Data;
}
namespace CustomerCashBalanceTransactionCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.CustomerCashBalanceTransaction;
previous_attributes?: Partial<Stripe.CustomerCashBalanceTransaction>;
}
}
/**
* Occurs whenever a customer's entitlements change.
*/
interface EntitlementsActiveEntitlementSummaryUpdatedEvent
extends EventBase {
type: 'entitlements.active_entitlement_summary.updated';
data: EntitlementsActiveEntitlementSummaryUpdatedEvent.Data;
}
namespace EntitlementsActiveEntitlementSummaryUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Entitlements.ActiveEntitlementSummary;
previous_attributes?: Partial<
Stripe.Entitlements.ActiveEntitlementSummary
>;
}
}
/**
* Occurs whenever a new Stripe-generated file is available for your account.
*/
interface FileCreatedEvent extends EventBase {
type: 'file.created';
data: FileCreatedEvent.Data;
}
namespace FileCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.File;
previous_attributes?: Partial<Stripe.File>;
}
}
/**
* Occurs when a Financial Connections account's account numbers are updated.
*/
interface FinancialConnectionsAccountAccountNumbersUpdatedEvent
extends EventBase {
type: 'financial_connections.account.account_numbers_updated';
data: FinancialConnectionsAccountAccountNumbersUpdatedEvent.Data;
}
namespace FinancialConnectionsAccountAccountNumbersUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when a new Financial Connections account is created.
*/
interface FinancialConnectionsAccountCreatedEvent extends EventBase {
type: 'financial_connections.account.created';
data: FinancialConnectionsAccountCreatedEvent.Data;
}
namespace FinancialConnectionsAccountCreatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when a Financial Connections account's status is updated from `active` to `inactive`.
*/
interface FinancialConnectionsAccountDeactivatedEvent extends EventBase {
type: 'financial_connections.account.deactivated';
data: FinancialConnectionsAccountDeactivatedEvent.Data;
}
namespace FinancialConnectionsAccountDeactivatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when a Financial Connections account is disconnected.
*/
interface FinancialConnectionsAccountDisconnectedEvent extends EventBase {
type: 'financial_connections.account.disconnected';
data: FinancialConnectionsAccountDisconnectedEvent.Data;
}
namespace FinancialConnectionsAccountDisconnectedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when a Financial Connections account's status is updated from `inactive` to `active`.
*/
interface FinancialConnectionsAccountReactivatedEvent extends EventBase {
type: 'financial_connections.account.reactivated';
data: FinancialConnectionsAccountReactivatedEvent.Data;
}
namespace FinancialConnectionsAccountReactivatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when an Account’s `balance_refresh` status transitions from `pending` to either `succeeded` or `failed`.
*/
interface FinancialConnectionsAccountRefreshedBalanceEvent
extends EventBase {
type: 'financial_connections.account.refreshed_balance';
data: FinancialConnectionsAccountRefreshedBalanceEvent.Data;
}
namespace FinancialConnectionsAccountRefreshedBalanceEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when an Account’s `ownership_refresh` status transitions from `pending` to either `succeeded` or `failed`.
*/
interface FinancialConnectionsAccountRefreshedOwnershipEvent
extends EventBase {
type: 'financial_connections.account.refreshed_ownership';
data: FinancialConnectionsAccountRefreshedOwnershipEvent.Data;
}
namespace FinancialConnectionsAccountRefreshedOwnershipEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.FinancialConnections.Account;
previous_attributes?: Partial<Stripe.FinancialConnections.Account>;
}
}
/**
* Occurs when an Account’s `transaction_refresh` status transitions from `pending` to either `succeeded` or `failed`.
*/
interface FinancialConnectionsAccountRefreshedTransactionsEvent