UNPKG

stripe

Version:
985 lines 135 kB
import { StripeResource } from '../StripeResource.js'; import { PaginationParams, RangeQueryParam } from '../shared.js'; import { RequestOptions, ApiListPromise, Response } from '../lib.js'; export declare class EventResource extends StripeResource { /** * List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). */ list(params?: EventListParams, options?: RequestOptions): ApiListPromise<Event>; /** * Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. */ retrieve(id: string, params?: EventRetrieveParams, options?: RequestOptions): Promise<Response<Event>>; } export interface EventBase { /** * Unique identifier for the object. */ id: string; /** * String representing the object's type. Objects of the same type share the same value. */ object: 'event'; /** * The connected account that originates the event. */ account?: string; /** * The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. */ api_version: string | null; /** * Authentication context needed to fetch the event or related object. */ context?: string; /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; data: Event.Data; /** * If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. */ livemode: boolean; /** * Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. */ pending_webhooks: number; /** * Information on the API request that triggers the event. */ request: Event.Request | null; /** * Description of the event (for example, `invoice.created` or `charge.refunded`). */ type: Event.Type; } export declare namespace Event { interface Data { /** * Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://api.stripe.com#invoice_object) as the value of the object key. */ object: Data.Object; /** * Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. */ previous_attributes?: Data.PreviousAttributes; } interface Request { /** * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. */ id: string | null; /** * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ idempotency_key: string | null; } type Type = 'account.application.authorized' | 'account.application.deauthorized' | 'account.external_account.created' | 'account.external_account.deleted' | 'account.external_account.updated' | 'account.updated' | 'application_fee.created' | 'application_fee.refund.updated' | 'application_fee.refunded' | 'balance.available' | 'balance_settings.updated' | 'billing.alert.triggered' | 'billing.credit_grant.created' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' | 'billing_portal.session.created' | 'capability.updated' | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' | 'charge.dispute.funds_reinstated' | 'charge.dispute.funds_withdrawn' | 'charge.dispute.updated' | 'charge.expired' | 'charge.failed' | 'charge.pending' | 'charge.refund.updated' | 'charge.refunded' | 'charge.succeeded' | 'charge.updated' | 'checkout.session.async_payment_failed' | 'checkout.session.async_payment_succeeded' | 'checkout.session.completed' | 'checkout.session.expired' | 'climate.order.canceled' | 'climate.order.created' | 'climate.order.delayed' | 'climate.order.delivered' | 'climate.order.product_substituted' | 'climate.product.created' | 'climate.product.pricing_updated' | 'coupon.created' | 'coupon.deleted' | 'coupon.updated' | 'credit_note.created' | 'credit_note.updated' | 'credit_note.voided' | 'customer.created' | 'customer.deleted' | 'customer.discount.created' | 'customer.discount.deleted' | 'customer.discount.updated' | 'customer.source.created' | 'customer.source.deleted' | 'customer.source.expiring' | 'customer.source.updated' | 'customer.subscription.created' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' | 'customer.subscription.pending_update_expired' | 'customer.subscription.resumed' | 'customer.subscription.trial_will_end' | 'customer.subscription.updated' | 'customer.tax_id.created' | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' | 'customer_cash_balance_transaction.created' | 'entitlements.active_entitlement_summary.updated' | 'file.created' | 'financial_connections.account.account_numbers_updated' | 'financial_connections.account.created' | 'financial_connections.account.deactivated' | 'financial_connections.account.disconnected' | 'financial_connections.account.reactivated' | 'financial_connections.account.refreshed_balance' | 'financial_connections.account.refreshed_ownership' | 'financial_connections.account.refreshed_transactions' | 'financial_connections.account.upcoming_account_number_expiry' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' | 'identity.verification_session.redacted' | 'identity.verification_session.requires_input' | 'identity.verification_session.verified' | 'invoice.created' | 'invoice.deleted' | 'invoice.finalization_failed' | 'invoice.finalized' | 'invoice.marked_uncollectible' | 'invoice.overdue' | 'invoice.overpaid' | 'invoice.paid' | 'invoice.payment_action_required' | 'invoice.payment_attempt_required' | 'invoice.payment_failed' | 'invoice.payment_succeeded' | 'invoice.sent' | 'invoice.upcoming' | 'invoice.updated' | 'invoice.voided' | 'invoice.will_be_due' | 'invoice_payment.paid' | 'invoiceitem.created' | 'invoiceitem.deleted' | 'issuing_authorization.created' | 'issuing_authorization.request' | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' | 'issuing_dispute.created' | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.funds_rescinded' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' | 'issuing_personalization_design.activated' | 'issuing_personalization_design.deactivated' | 'issuing_personalization_design.rejected' | 'issuing_personalization_design.updated' | 'issuing_token.created' | 'issuing_token.updated' | 'issuing_transaction.created' | 'issuing_transaction.purchase_details_receipt_updated' | 'issuing_transaction.updated' | 'mandate.updated' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' | 'payment_intent.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' | 'payment_link.created' | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' | 'payment_method.updated' | 'payout.canceled' | 'payout.created' | 'payout.failed' | 'payout.paid' | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' | 'person.updated' | 'plan.created' | 'plan.deleted' | 'plan.updated' | 'price.created' | 'price.deleted' | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated' | 'promotion_code.created' | 'promotion_code.updated' | 'quote.accepted' | 'quote.canceled' | 'quote.created' | 'quote.finalized' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' | 'refund.created' | 'refund.failed' | 'refund.updated' | 'reporting.report_run.failed' | 'reporting.report_run.succeeded' | 'reporting.report_type.updated' | 'reserve.hold.created' | 'reserve.hold.updated' | 'reserve.plan.created' | 'reserve.plan.disabled' | 'reserve.plan.expired' | 'reserve.plan.updated' | 'reserve.release.created' | 'review.closed' | 'review.opened' | 'setup_intent.canceled' | 'setup_intent.created' | 'setup_intent.requires_action' | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' | 'source.canceled' | 'source.chargeable' | 'source.failed' | 'source.mandate_notification' | 'source.refund_attributes_required' | 'source.transaction.created' | 'source.transaction.updated' | 'subscription_schedule.aborted' | 'subscription_schedule.canceled' | 'subscription_schedule.completed' | 'subscription_schedule.created' | 'subscription_schedule.expiring' | 'subscription_schedule.released' | 'subscription_schedule.updated' | 'tax.settings.updated' | 'tax_rate.created' | 'tax_rate.updated' | 'terminal.reader.action_failed' | 'terminal.reader.action_succeeded' | 'terminal.reader.action_updated' | 'test_helpers.test_clock.advancing' | 'test_helpers.test_clock.created' | 'test_helpers.test_clock.deleted' | 'test_helpers.test_clock.internal_failure' | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' | 'transfer.reversed' | 'transfer.updated' | 'treasury.credit_reversal.created' | 'treasury.credit_reversal.posted' | 'treasury.debit_reversal.completed' | 'treasury.debit_reversal.created' | 'treasury.debit_reversal.initial_credit_granted' | 'treasury.financial_account.closed' | 'treasury.financial_account.created' | 'treasury.financial_account.features_status_updated' | 'treasury.inbound_transfer.canceled' | 'treasury.inbound_transfer.created' | 'treasury.inbound_transfer.failed' | 'treasury.inbound_transfer.succeeded' | 'treasury.outbound_payment.canceled' | 'treasury.outbound_payment.created' | 'treasury.outbound_payment.expected_arrival_date_updated' | 'treasury.outbound_payment.failed' | 'treasury.outbound_payment.posted' | 'treasury.outbound_payment.returned' | 'treasury.outbound_payment.tracking_details_updated' | 'treasury.outbound_transfer.canceled' | 'treasury.outbound_transfer.created' | 'treasury.outbound_transfer.expected_arrival_date_updated' | 'treasury.outbound_transfer.failed' | 'treasury.outbound_transfer.posted' | 'treasury.outbound_transfer.returned' | 'treasury.outbound_transfer.tracking_details_updated' | 'treasury.received_credit.created' | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created' | 'billing.credit_balance_transaction.created' | 'billing.credit_grant.updated' | 'billing.meter.created' | 'billing.meter.deactivated' | 'billing.meter.reactivated' | 'billing.meter.updated'; namespace Data { interface Object { } interface PreviousAttributes { } } } export interface EventRetrieveParams { /** * Specifies which fields in the response should be expanded. */ expand?: Array<string>; } export interface EventListParams extends PaginationParams { /** * Only return events that were created during the given date interval. */ created?: RangeQueryParam | number; /** * Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ delivery_success?: boolean; /** * Specifies which fields in the response should be expanded. */ expand?: Array<string>; /** * A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. */ type?: string; /** * An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. */ types?: Array<string>; } import { Billing } from './Billing/index.js'; import { BillingPortal } from './BillingPortal/index.js'; import { Checkout } from './Checkout/index.js'; import { Climate } from './Climate/index.js'; import { Entitlements } from './Entitlements/index.js'; import { FinancialConnections } from './FinancialConnections/index.js'; import { Identity } from './Identity/index.js'; import { Issuing } from './Issuing/index.js'; import { Radar } from './Radar/index.js'; import { Reporting } from './Reporting/index.js'; import { Reserve } from './Reserve/index.js'; import { Sigma } from './Sigma/index.js'; import { Tax } from './Tax/index.js'; import { Terminal } from './Terminal/index.js'; import { TestHelpers } from './TestHelpers/index.js'; import { Treasury } from './Treasury/index.js'; import { Application } from './Applications.js'; import { ExternalAccount } from './ExternalAccounts.js'; import { Account } from './Accounts.js'; import { ApplicationFee } from './ApplicationFees.js'; import { FeeRefund } from './FeeRefunds.js'; import { Balance } from './Balance.js'; import { BalanceSettings } from './BalanceSettings.js'; import { Capability } from './Capabilities.js'; import { CashBalance } from './CashBalances.js'; import { Charge } from './Charges.js'; import { Dispute } from './Disputes.js'; import { Refund } from './Refunds.js'; import { Coupon } from './Coupons.js'; import { CreditNote } from './CreditNotes.js'; import { Customer } from './Customers.js'; import { Discount } from './Discounts.js'; import { CustomerSource } from './CustomerSources.js'; import { Subscription } from './Subscriptions.js'; import { TaxId } from './TaxIds.js'; import { CustomerCashBalanceTransaction } from './CustomerCashBalanceTransactions.js'; import { File } from './Files.js'; import { Invoice } from './Invoices.js'; import { InvoicePayment } from './InvoicePayments.js'; import { InvoiceItem } from './InvoiceItems.js'; import { Mandate } from './Mandates.js'; import { PaymentIntent } from './PaymentIntents.js'; import { PaymentLink } from './PaymentLinks.js'; import { PaymentMethod } from './PaymentMethods.js'; import { Payout } from './Payouts.js'; import { Person } from './Persons.js'; import { Plan } from './Plans.js'; import { Price } from './Prices.js'; import { Product } from './Products.js'; import { PromotionCode } from './PromotionCodes.js'; import { Quote } from './Quotes.js'; import { Review } from './Reviews.js'; import { SetupIntent } from './SetupIntents.js'; import { Source } from './Sources.js'; import { SourceMandateNotification } from './SourceMandateNotifications.js'; import { SourceTransaction } from './SourceTransactions.js'; import { SubscriptionSchedule } from './SubscriptionSchedules.js'; import { TaxRate } from './TaxRates.js'; import { Topup } from './Topups.js'; import { Transfer } from './Transfers.js'; 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 | ReserveHoldCreatedEvent | ReserveHoldUpdatedEvent | ReservePlanCreatedEvent | ReservePlanDisabledEvent | ReservePlanExpiredEvent | ReservePlanUpdatedEvent | ReserveReleaseCreatedEvent | 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; /** * Occurs whenever a user authorizes an application. Sent to the related application only. */ export interface AccountApplicationAuthorizedEvent extends EventBase { type: 'account.application.authorized'; data: AccountApplicationAuthorizedEvent.Data; } export declare namespace AccountApplicationAuthorizedEvent { interface Data extends Event.Data { object: Application; previous_attributes?: Partial<Application>; } } /** * Occurs whenever a user deauthorizes an application. Sent to the related application only. */ export interface AccountApplicationDeauthorizedEvent extends EventBase { type: 'account.application.deauthorized'; data: AccountApplicationDeauthorizedEvent.Data; } export declare namespace AccountApplicationDeauthorizedEvent { interface Data extends Event.Data { object: Application; previous_attributes?: Partial<Application>; } } /** * Occurs whenever an external account is created. */ export interface AccountExternalAccountCreatedEvent extends EventBase { type: 'account.external_account.created'; data: AccountExternalAccountCreatedEvent.Data; } export declare namespace AccountExternalAccountCreatedEvent { interface Data extends Event.Data { object: ExternalAccount; previous_attributes?: Partial<ExternalAccount>; } } /** * Occurs whenever an external account is deleted. */ export interface AccountExternalAccountDeletedEvent extends EventBase { type: 'account.external_account.deleted'; data: AccountExternalAccountDeletedEvent.Data; } export declare namespace AccountExternalAccountDeletedEvent { interface Data extends Event.Data { object: ExternalAccount; previous_attributes?: Partial<ExternalAccount>; } } /** * Occurs whenever an external account is updated. */ export interface AccountExternalAccountUpdatedEvent extends EventBase { type: 'account.external_account.updated'; data: AccountExternalAccountUpdatedEvent.Data; } export declare namespace AccountExternalAccountUpdatedEvent { interface Data extends Event.Data { object: ExternalAccount; previous_attributes?: Partial<ExternalAccount>; } } /** * Occurs whenever an account status or property has changed. */ export interface AccountUpdatedEvent extends EventBase { type: 'account.updated'; data: AccountUpdatedEvent.Data; } export declare namespace AccountUpdatedEvent { interface Data extends Event.Data { object: Account; previous_attributes?: Partial<Account>; } } /** * Occurs whenever an application fee is created on a charge. */ export interface ApplicationFeeCreatedEvent extends EventBase { type: 'application_fee.created'; data: ApplicationFeeCreatedEvent.Data; } export declare namespace ApplicationFeeCreatedEvent { interface Data extends Event.Data { object: ApplicationFee; previous_attributes?: Partial<ApplicationFee>; } } /** * Occurs whenever an application fee refund is updated. */ export interface ApplicationFeeRefundUpdatedEvent extends EventBase { type: 'application_fee.refund.updated'; data: ApplicationFeeRefundUpdatedEvent.Data; } export declare namespace ApplicationFeeRefundUpdatedEvent { interface Data extends Event.Data { object: FeeRefund; previous_attributes?: Partial<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. */ export interface ApplicationFeeRefundedEvent extends EventBase { type: 'application_fee.refunded'; data: ApplicationFeeRefundedEvent.Data; } export declare namespace ApplicationFeeRefundedEvent { interface Data extends Event.Data { object: ApplicationFee; previous_attributes?: Partial<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. */ export interface BalanceAvailableEvent extends EventBase { type: 'balance.available'; data: BalanceAvailableEvent.Data; } export declare namespace BalanceAvailableEvent { interface Data extends Event.Data { object: Balance; previous_attributes?: Partial<Balance>; } } /** * Occurs whenever a balance settings status or property has changed. */ export interface BalanceSettingsUpdatedEvent extends EventBase { type: 'balance_settings.updated'; data: BalanceSettingsUpdatedEvent.Data; } export declare namespace BalanceSettingsUpdatedEvent { interface Data extends Event.Data { object: BalanceSettings; previous_attributes?: Partial<BalanceSettings>; } } /** * Occurs whenever your custom alert threshold is met. */ export interface BillingAlertTriggeredEvent extends EventBase { type: 'billing.alert.triggered'; data: BillingAlertTriggeredEvent.Data; } export declare namespace BillingAlertTriggeredEvent { interface Data extends Event.Data { object: Billing.AlertTriggered; previous_attributes?: Partial<Billing.AlertTriggered>; } } /** * Occurs when a credit balance transaction is created */ export interface BillingCreditBalanceTransactionCreatedEvent extends EventBase { type: 'billing.credit_balance_transaction.created'; data: BillingCreditBalanceTransactionCreatedEvent.Data; } export declare namespace BillingCreditBalanceTransactionCreatedEvent { interface Data extends Event.Data { object: Billing.CreditBalanceTransaction; previous_attributes?: Partial<Billing.CreditBalanceTransaction>; } } /** * Occurs when a credit grant is created */ export interface BillingCreditGrantCreatedEvent extends EventBase { type: 'billing.credit_grant.created'; data: BillingCreditGrantCreatedEvent.Data; } export declare namespace BillingCreditGrantCreatedEvent { interface Data extends Event.Data { object: Billing.CreditGrant; previous_attributes?: Partial<Billing.CreditGrant>; } } /** * Occurs when a credit grant is updated */ export interface BillingCreditGrantUpdatedEvent extends EventBase { type: 'billing.credit_grant.updated'; data: BillingCreditGrantUpdatedEvent.Data; } export declare namespace BillingCreditGrantUpdatedEvent { interface Data extends Event.Data { object: Billing.CreditGrant; previous_attributes?: Partial<Billing.CreditGrant>; } } /** * Occurs when a meter is created */ export interface BillingMeterCreatedEvent extends EventBase { type: 'billing.meter.created'; data: BillingMeterCreatedEvent.Data; } export declare namespace BillingMeterCreatedEvent { interface Data extends Event.Data { object: Billing.Meter; previous_attributes?: Partial<Billing.Meter>; } } /** * Occurs when a meter is deactivated */ export interface BillingMeterDeactivatedEvent extends EventBase { type: 'billing.meter.deactivated'; data: BillingMeterDeactivatedEvent.Data; } export declare namespace BillingMeterDeactivatedEvent { interface Data extends Event.Data { object: Billing.Meter; previous_attributes?: Partial<Billing.Meter>; } } /** * Occurs when a meter is reactivated */ export interface BillingMeterReactivatedEvent extends EventBase { type: 'billing.meter.reactivated'; data: BillingMeterReactivatedEvent.Data; } export declare namespace BillingMeterReactivatedEvent { interface Data extends Event.Data { object: Billing.Meter; previous_attributes?: Partial<Billing.Meter>; } } /** * Occurs when a meter is updated */ export interface BillingMeterUpdatedEvent extends EventBase { type: 'billing.meter.updated'; data: BillingMeterUpdatedEvent.Data; } export declare namespace BillingMeterUpdatedEvent { interface Data extends Event.Data { object: Billing.Meter; previous_attributes?: Partial<Billing.Meter>; } } /** * Occurs whenever a portal configuration is created. */ export interface BillingPortalConfigurationCreatedEvent extends EventBase { type: 'billing_portal.configuration.created'; data: BillingPortalConfigurationCreatedEvent.Data; } export declare namespace BillingPortalConfigurationCreatedEvent { interface Data extends Event.Data { object: BillingPortal.Configuration; previous_attributes?: Partial<BillingPortal.Configuration>; } } /** * Occurs whenever a portal configuration is updated. */ export interface BillingPortalConfigurationUpdatedEvent extends EventBase { type: 'billing_portal.configuration.updated'; data: BillingPortalConfigurationUpdatedEvent.Data; } export declare namespace BillingPortalConfigurationUpdatedEvent { interface Data extends Event.Data { object: BillingPortal.Configuration; previous_attributes?: Partial<BillingPortal.Configuration>; } } /** * Occurs whenever a portal session is created. */ export interface BillingPortalSessionCreatedEvent extends EventBase { type: 'billing_portal.session.created'; data: BillingPortalSessionCreatedEvent.Data; } export declare namespace BillingPortalSessionCreatedEvent { interface Data extends Event.Data { object: BillingPortal.Session; previous_attributes?: Partial<BillingPortal.Session>; } } /** * Occurs whenever a capability has new requirements or a new status. */ export interface CapabilityUpdatedEvent extends EventBase { type: 'capability.updated'; data: CapabilityUpdatedEvent.Data; } export declare namespace CapabilityUpdatedEvent { interface Data extends Event.Data { object: Capability; previous_attributes?: Partial<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. */ export interface CashBalanceFundsAvailableEvent extends EventBase { type: 'cash_balance.funds_available'; data: CashBalanceFundsAvailableEvent.Data; } export declare namespace CashBalanceFundsAvailableEvent { interface Data extends Event.Data { object: CashBalance; previous_attributes?: Partial<CashBalance>; } } /** * Occurs whenever a previously uncaptured charge is captured. */ export interface ChargeCapturedEvent extends EventBase { type: 'charge.captured'; data: ChargeCapturedEvent.Data; } export declare namespace ChargeCapturedEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs when a dispute is closed and the dispute status changes to `lost`, `warning_closed`, or `won`. */ export interface ChargeDisputeClosedEvent extends EventBase { type: 'charge.dispute.closed'; data: ChargeDisputeClosedEvent.Data; } export declare namespace ChargeDisputeClosedEvent { interface Data extends Event.Data { object: Dispute; previous_attributes?: Partial<Dispute>; } } /** * Occurs whenever a customer disputes a charge with their bank. */ export interface ChargeDisputeCreatedEvent extends EventBase { type: 'charge.dispute.created'; data: ChargeDisputeCreatedEvent.Data; } export declare namespace ChargeDisputeCreatedEvent { interface Data extends Event.Data { object: Dispute; previous_attributes?: Partial<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). */ export interface ChargeDisputeFundsReinstatedEvent extends EventBase { type: 'charge.dispute.funds_reinstated'; data: ChargeDisputeFundsReinstatedEvent.Data; } export declare namespace ChargeDisputeFundsReinstatedEvent { interface Data extends Event.Data { object: Dispute; previous_attributes?: Partial<Dispute>; } } /** * Occurs when funds are removed from your account due to a dispute. */ export interface ChargeDisputeFundsWithdrawnEvent extends EventBase { type: 'charge.dispute.funds_withdrawn'; data: ChargeDisputeFundsWithdrawnEvent.Data; } export declare namespace ChargeDisputeFundsWithdrawnEvent { interface Data extends Event.Data { object: Dispute; previous_attributes?: Partial<Dispute>; } } /** * Occurs when the dispute is updated (usually with evidence). */ export interface ChargeDisputeUpdatedEvent extends EventBase { type: 'charge.dispute.updated'; data: ChargeDisputeUpdatedEvent.Data; } export declare namespace ChargeDisputeUpdatedEvent { interface Data extends Event.Data { object: Dispute; previous_attributes?: Partial<Dispute>; } } /** * Occurs whenever an uncaptured charge expires. */ export interface ChargeExpiredEvent extends EventBase { type: 'charge.expired'; data: ChargeExpiredEvent.Data; } export declare namespace ChargeExpiredEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs whenever a failed charge attempt occurs. */ export interface ChargeFailedEvent extends EventBase { type: 'charge.failed'; data: ChargeFailedEvent.Data; } export declare namespace ChargeFailedEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs whenever a pending charge is created. */ export interface ChargePendingEvent extends EventBase { type: 'charge.pending'; data: ChargePendingEvent.Data; } export declare namespace ChargePendingEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs whenever a refund is updated on selected payment methods. For updates on all refunds, listen to `refund.updated` instead. */ export interface ChargeRefundUpdatedEvent extends EventBase { type: 'charge.refund.updated'; data: ChargeRefundUpdatedEvent.Data; } export declare namespace ChargeRefundUpdatedEvent { interface Data extends Event.Data { object: Refund; previous_attributes?: Partial<Refund>; } } /** * Occurs whenever a charge is refunded, including partial refunds. Listen to `refund.created` for information about the refund. */ export interface ChargeRefundedEvent extends EventBase { type: 'charge.refunded'; data: ChargeRefundedEvent.Data; } export declare namespace ChargeRefundedEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs whenever a charge is successful. */ export interface ChargeSucceededEvent extends EventBase { type: 'charge.succeeded'; data: ChargeSucceededEvent.Data; } export declare namespace ChargeSucceededEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs whenever a charge description or metadata is updated, or upon an asynchronous capture. */ export interface ChargeUpdatedEvent extends EventBase { type: 'charge.updated'; data: ChargeUpdatedEvent.Data; } export declare namespace ChargeUpdatedEvent { interface Data extends Event.Data { object: Charge; previous_attributes?: Partial<Charge>; } } /** * Occurs when a payment intent using a delayed payment method fails. */ export interface CheckoutSessionAsyncPaymentFailedEvent extends EventBase { type: 'checkout.session.async_payment_failed'; data: CheckoutSessionAsyncPaymentFailedEvent.Data; } export declare namespace CheckoutSessionAsyncPaymentFailedEvent { interface Data extends Event.Data { object: Checkout.Session; previous_attributes?: Partial<Checkout.Session>; } } /** * Occurs when a payment intent using a delayed payment method finally succeeds. */ export interface CheckoutSessionAsyncPaymentSucceededEvent extends EventBase { type: 'checkout.session.async_payment_succeeded'; data: CheckoutSessionAsyncPaymentSucceededEvent.Data; } export declare namespace CheckoutSessionAsyncPaymentSucceededEvent { interface Data extends Event.Data { object: Checkout.Session; previous_attributes?: Partial<Checkout.Session>; } } /** * Occurs when a Checkout Session has been successfully completed. */ export interface CheckoutSessionCompletedEvent extends EventBase { type: 'checkout.session.completed'; data: CheckoutSessionCompletedEvent.Data; } export declare namespace CheckoutSessionCompletedEvent { interface Data extends Event.Data { object: Checkout.Session; previous_attributes?: Partial<Checkout.Session>; } } /** * Occurs when a Checkout Session is expired. */ export interface CheckoutSessionExpiredEvent extends EventBase { type: 'checkout.session.expired'; data: CheckoutSessionExpiredEvent.Data; } export declare namespace CheckoutSessionExpiredEvent { interface Data extends Event.Data { object: Checkout.Session; previous_attributes?: Partial<Checkout.Session>; } } /** * Occurs when a Climate order is canceled. */ export interface ClimateOrderCanceledEvent extends EventBase { type: 'climate.order.canceled'; data: ClimateOrderCanceledEvent.Data; } export declare namespace ClimateOrderCanceledEvent { interface Data extends Event.Data { object: Climate.Order; previous_attributes?: Partial<Climate.Order>; } } /** * Occurs when a Climate order is created. */ export interface ClimateOrderCreatedEvent extends EventBase { type: 'climate.order.created'; data: ClimateOrderCreatedEvent.Data; } export declare namespace ClimateOrderCreatedEvent { interface Data extends Event.Data { object: Climate.Order; previous_attributes?: Partial<Climate.Order>; } } /** * Occurs when a Climate order is delayed. */ export interface ClimateOrderDelayedEvent extends EventBase { type: 'climate.order.delayed'; data: ClimateOrderDelayedEvent.Data; } export declare namespace ClimateOrderDelayedEvent { interface Data extends Event.Data { object: Climate.Order; previous_attributes?: Partial<Climate.Order>; } } /** * Occurs when a Climate order is delivered. */ export interface ClimateOrderDeliveredEvent extends EventBase { type: 'climate.order.delivered'; data: ClimateOrderDeliveredEvent.Data; } export declare namespace ClimateOrderDeliveredEvent { interface Data extends Event.Data { object: Climate.Order; previous_attributes?: Partial<Climate.Order>; } } /** * Occurs when a Climate order's product is substituted for another. */ export interface ClimateOrderProductSubstitutedEvent extends EventBase { type: 'climate.order.product_substituted'; data: ClimateOrderProductSubstitutedEvent.Data; } export declare namespace ClimateOrderProductSubstitutedEvent { interface Data extends Event.Data { object: Climate.Order; previous_attributes?: Partial<Climate.Order>; } } /** * Occurs when a Climate product is created. */ export interface ClimateProductCreatedEvent extends EventBase { type: 'climate.product.created'; data: ClimateProductCreatedEvent.Data; } export declare namespace ClimateProductCreatedEvent { interface Data extends Event.Data { object: Climate.Product; previous_attributes?: Partial<Climate.Product>; } } /** * Occurs when a Climate product is updated. */ export interface ClimateProductPricingUpdatedEvent extends EventBase { type: 'climate.product.pricing_updated'; data: ClimateProductPricingUpdatedEvent.Data; } export declare namespace ClimateProductPricingUpdatedEvent { interface Data extends Event.Data { object: Climate.Product; previous_attributes?: Partial<Climate.Product>; } } /** * Occurs whenever a coupon is created. */ export interface CouponCreatedEvent extends EventBase { type: 'coupon.created'; data: CouponCreatedEvent.Data; } export declare namespace CouponCreatedEvent { interface Data extends Event.Data { object: Coupon; previous_attributes?: Partial<Coupon>; } } /** * Occurs whenever a coupon is deleted. */ export interface CouponDeletedEvent extends EventBase { type: 'coupon.deleted'; data: CouponDeletedEvent.Data; } export declare namespace CouponDeletedEvent { interface Data extends Event.Data { object: Coupon; previous_attributes?: Partial<Coupon>; } } /** * Occurs whenever a coupon is updated. */ export interface CouponUpdatedEvent extends EventBase { type: 'coupon.updated'; data: CouponUpdatedEvent.Data; } export declare namespace CouponUpdatedEvent { interface Data extends Event.Data { object: Coupon; previous_attributes?: Partial<Coupon>; } } /** * Occurs whenever a credit note is created. */ export interface CreditNoteCreatedEvent extends EventBase { type: 'credit_note.created'; data: CreditNoteCreatedEvent.Data; } export declare namespace CreditNoteCreatedEvent { interface Data extends Event.Data { object: CreditNote; previous_attributes?: Partial<CreditNote>; } } /** * Occurs whenever a credit note is updated. */ export interface CreditNoteUpdatedEvent extends EventBase { type: 'credit_note.updated'; data: CreditNoteUpdatedEvent.Data; } export declare namespace CreditNoteUpdatedEvent { interface Data extends Event.Data { object: CreditNote; previous_attributes?: Partial<CreditNote>; } } /** * Occurs whenever a credit note is voided. */ export interface CreditNoteVoidedEvent extends EventBase { type: 'credit_note.voided'; data: CreditNoteVoidedEvent.Data; } export declare namespace CreditNoteVoidedEvent { interface Data extends Event.Data { object: CreditNote; previous_attributes?: Partial<CreditNote>; } } /** * Occurs whenever a new customer is created. */ export interface CustomerCreatedEvent extends EventBase { type: 'customer.created'; data: CustomerCreatedEvent.Data; } export declare namespace CustomerCreatedEvent { interface Data extends Event.Data { object: Customer; previous_attributes?: Partial<Customer>; } } /** * Occurs whenever a customer is deleted. */ export interface CustomerDeletedEvent extends EventBase { type: 'customer.deleted'; data: CustomerDeletedEvent.Data; } export declare namespace CustomerDeletedEvent { interface Data extends Event.Data { object: Customer; previous_attributes?: Partial<Customer>; } } /** * Occurs whenever a coupon is attached to a customer. */ export interface CustomerDiscountCreatedEvent extends EventBase { type: 'customer.discount.created'; data: CustomerDiscountCreatedEvent.Data; } export declare namespace CustomerDiscountCreatedEvent { interface Data extends Event.Data { object: Discount; previous_attributes?: Partial<Discount>; } } /** * Occurs whenever a coupon is removed from a customer. */ export interface CustomerDiscountDeletedEvent extends EventBase { type: 'customer.discount.deleted'; data: CustomerDiscountDeletedEvent.Data; } export declare namespace CustomerDiscountDeletedEvent { interface Data extends Event.Data { object: Discount; previous_attributes?: Partial<Discount>; } } /** * Occurs whenever a customer is switched from one coupon to another. */ export interface CustomerDiscountUpdatedEvent extends EventBase { type: 'customer.discount.updated'; data: CustomerDiscountUpdatedEvent.Data; } export declare namespace CustomerDiscountUpdatedEvent { interface Data extends Event.Data { object: Discount; previous_attributes?: Partial<Discount>; } } /** * Occurs whenever a new source is created for a customer. */ export interface CustomerSourceCreatedEvent extends EventBase { type: 'customer.source.created'; data: CustomerSourceCreatedEvent.Data; } export declare namespace CustomerSourceCreatedEvent { interface Data extends Event.Data { object: CustomerSource; previous_attributes?: Partial<CustomerSource>; } } /** * Occurs whenever a source is removed from a customer. */ export interface CustomerSourceDeletedEvent extends EventBase { type: 'customer.source.deleted'; data: CustomerSourceDeletedEvent.Data; } export declare namespace CustomerSourceDeletedEvent { interface Data extends Event.Data { object: CustomerSource; previous_attributes?: Partial<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. */ export interface CustomerSourceExpiringEvent extends EventBase { type: 'customer.source.expiring'; data: CustomerSourceExpiringEvent.Data; } export declare namespace CustomerSourceExpiringEvent { interface Data extends Event.Data { object: CustomerSource; previous_attributes?: Partial<CustomerSource>; } } /** * Occurs whenever a source's details are changed. */ export interface CustomerSourceUpdatedEvent extends EventBase { type: 'customer.source.upda