/// /// /// /// /// /// /// /// /// /// /// /// // Imports: The beginning of the section generated from our OpenAPI spec /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// // Imports: The end of the section generated from our OpenAPI spec declare module 'stripe' { // Added to in other modules, referenced above. export namespace Stripe {} export class Stripe { static Stripe: typeof Stripe; // Actually has the signature `Stripe.Webhooks & ((platformFunctions?: PlatformFunctions) => Stripe.Webhooks)` // However the factory function signature was never public in the typings and // will be removed in the next major version so it is omitted // See https://github.com/stripe/stripe-node/issues/1956 static webhooks: Stripe.Webhooks; constructor(apiKey: string, config?: Stripe.StripeConfig); StripeResource: Stripe.StripeResource; // Fields: The beginning of the section generated from our OpenAPI spec accountLinks: Stripe.AccountLinksResource; accountSessions: Stripe.AccountSessionsResource; accounts: Stripe.AccountsResource; applePayDomains: Stripe.ApplePayDomainsResource; applicationFees: Stripe.ApplicationFeesResource; balance: Stripe.BalanceResource; balanceTransactions: Stripe.BalanceTransactionsResource; charges: Stripe.ChargesResource; confirmationTokens: Stripe.ConfirmationTokensResource; countrySpecs: Stripe.CountrySpecsResource; coupons: Stripe.CouponsResource; creditNotes: Stripe.CreditNotesResource; customerSessions: Stripe.CustomerSessionsResource; customers: Stripe.CustomersResource; disputes: Stripe.DisputesResource; ephemeralKeys: Stripe.EphemeralKeysResource; events: Stripe.EventsResource; exchangeRates: Stripe.ExchangeRatesResource; fileLinks: Stripe.FileLinksResource; files: Stripe.FilesResource; invoiceItems: Stripe.InvoiceItemsResource; invoiceRenderingTemplates: Stripe.InvoiceRenderingTemplatesResource; invoices: Stripe.InvoicesResource; mandates: Stripe.MandatesResource; paymentIntents: Stripe.PaymentIntentsResource; paymentLinks: Stripe.PaymentLinksResource; paymentMethodConfigurations: Stripe.PaymentMethodConfigurationsResource; paymentMethodDomains: Stripe.PaymentMethodDomainsResource; paymentMethods: Stripe.PaymentMethodsResource; payouts: Stripe.PayoutsResource; plans: Stripe.PlansResource; prices: Stripe.PricesResource; products: Stripe.ProductsResource; promotionCodes: Stripe.PromotionCodesResource; quotes: Stripe.QuotesResource; refunds: Stripe.RefundsResource; reviews: Stripe.ReviewsResource; setupAttempts: Stripe.SetupAttemptsResource; setupIntents: Stripe.SetupIntentsResource; shippingRates: Stripe.ShippingRatesResource; sources: Stripe.SourcesResource; subscriptionItems: Stripe.SubscriptionItemsResource; subscriptionSchedules: Stripe.SubscriptionSchedulesResource; subscriptions: Stripe.SubscriptionsResource; taxCodes: Stripe.TaxCodesResource; taxIds: Stripe.TaxIdsResource; taxRates: Stripe.TaxRatesResource; tokens: Stripe.TokensResource; topups: Stripe.TopupsResource; transfers: Stripe.TransfersResource; webhookEndpoints: Stripe.WebhookEndpointsResource; apps: { secrets: Stripe.Apps.SecretsResource; }; billing: { alerts: Stripe.Billing.AlertsResource; creditBalanceSummary: Stripe.Billing.CreditBalanceSummaryResource; creditBalanceTransactions: Stripe.Billing.CreditBalanceTransactionsResource; creditGrants: Stripe.Billing.CreditGrantsResource; meters: Stripe.Billing.MetersResource; meterEvents: Stripe.Billing.MeterEventsResource; meterEventAdjustments: Stripe.Billing.MeterEventAdjustmentsResource; }; billingPortal: { configurations: Stripe.BillingPortal.ConfigurationsResource; sessions: Stripe.BillingPortal.SessionsResource; }; checkout: { sessions: Stripe.Checkout.SessionsResource; }; climate: { orders: Stripe.Climate.OrdersResource; products: Stripe.Climate.ProductsResource; suppliers: Stripe.Climate.SuppliersResource; }; entitlements: { activeEntitlements: Stripe.Entitlements.ActiveEntitlementsResource; features: Stripe.Entitlements.FeaturesResource; }; financialConnections: { accounts: Stripe.FinancialConnections.AccountsResource; sessions: Stripe.FinancialConnections.SessionsResource; transactions: Stripe.FinancialConnections.TransactionsResource; }; forwarding: { requests: Stripe.Forwarding.RequestsResource; }; identity: { verificationReports: Stripe.Identity.VerificationReportsResource; verificationSessions: Stripe.Identity.VerificationSessionsResource; }; issuing: { authorizations: Stripe.Issuing.AuthorizationsResource; cards: Stripe.Issuing.CardsResource; cardholders: Stripe.Issuing.CardholdersResource; disputes: Stripe.Issuing.DisputesResource; personalizationDesigns: Stripe.Issuing.PersonalizationDesignsResource; physicalBundles: Stripe.Issuing.PhysicalBundlesResource; tokens: Stripe.Issuing.TokensResource; transactions: Stripe.Issuing.TransactionsResource; }; radar: { earlyFraudWarnings: Stripe.Radar.EarlyFraudWarningsResource; valueLists: Stripe.Radar.ValueListsResource; valueListItems: Stripe.Radar.ValueListItemsResource; }; reporting: { reportRuns: Stripe.Reporting.ReportRunsResource; reportTypes: Stripe.Reporting.ReportTypesResource; }; sigma: { scheduledQueryRuns: Stripe.Sigma.ScheduledQueryRunsResource; }; tax: { calculations: Stripe.Tax.CalculationsResource; registrations: Stripe.Tax.RegistrationsResource; settings: Stripe.Tax.SettingsResource; transactions: Stripe.Tax.TransactionsResource; }; terminal: { configurations: Stripe.Terminal.ConfigurationsResource; connectionTokens: Stripe.Terminal.ConnectionTokensResource; locations: Stripe.Terminal.LocationsResource; readers: Stripe.Terminal.ReadersResource; }; testHelpers: { confirmationTokens: Stripe.TestHelpers.ConfirmationTokensResource; customers: Stripe.TestHelpers.CustomersResource; refunds: Stripe.TestHelpers.RefundsResource; testClocks: Stripe.TestHelpers.TestClocksResource; issuing: { authorizations: Stripe.TestHelpers.Issuing.AuthorizationsResource; cards: Stripe.TestHelpers.Issuing.CardsResource; personalizationDesigns: Stripe.TestHelpers.Issuing.PersonalizationDesignsResource; transactions: Stripe.TestHelpers.Issuing.TransactionsResource; }; terminal: { readers: Stripe.TestHelpers.Terminal.ReadersResource; }; treasury: { inboundTransfers: Stripe.TestHelpers.Treasury.InboundTransfersResource; outboundPayments: Stripe.TestHelpers.Treasury.OutboundPaymentsResource; outboundTransfers: Stripe.TestHelpers.Treasury.OutboundTransfersResource; receivedCredits: Stripe.TestHelpers.Treasury.ReceivedCreditsResource; receivedDebits: Stripe.TestHelpers.Treasury.ReceivedDebitsResource; }; }; treasury: { creditReversals: Stripe.Treasury.CreditReversalsResource; debitReversals: Stripe.Treasury.DebitReversalsResource; financialAccounts: Stripe.Treasury.FinancialAccountsResource; inboundTransfers: Stripe.Treasury.InboundTransfersResource; outboundPayments: Stripe.Treasury.OutboundPaymentsResource; outboundTransfers: Stripe.Treasury.OutboundTransfersResource; receivedCredits: Stripe.Treasury.ReceivedCreditsResource; receivedDebits: Stripe.Treasury.ReceivedDebitsResource; transactions: Stripe.Treasury.TransactionsResource; transactionEntries: Stripe.Treasury.TransactionEntriesResource; }; v2: { billing: { meterEventSession: Stripe.V2.Billing.MeterEventSessionResource; meterEventAdjustments: Stripe.V2.Billing.MeterEventAdjustmentsResource; meterEventStream: Stripe.V2.Billing.MeterEventStreamResource; meterEvents: Stripe.V2.Billing.MeterEventsResource; }; core: { eventDestinations: Stripe.V2.Core.EventDestinationsResource; events: Stripe.V2.Core.EventsResource; }; }; // Fields: The end of the section generated from our OpenAPI spec webhooks: Stripe.Webhooks; oauth: Stripe.OAuthResource; /** * API Errors */ errors: typeof Stripe.errors; on(event: 'request', handler: (event: Stripe.RequestEvent) => void): void; on(event: 'response', handler: (event: Stripe.ResponseEvent) => void): void; once(event: 'request', handler: (event: Stripe.RequestEvent) => void): void; once( event: 'response', handler: (event: Stripe.ResponseEvent) => void ): void; off(event: 'request', handler: (event: Stripe.RequestEvent) => void): void; off( event: 'response', handler: (event: Stripe.ResponseEvent) => void ): void; /** * Allows for sending "raw" requests to the Stripe API, which can be used for * testing new API endpoints or performing requests that the library does * not support yet. * * This is an experimental interface and is not yet stable. * * @param method - HTTP request method, 'GET', 'POST', or 'DELETE' * @param path - The path of the request, e.g. '/v1/beta_endpoint' * @param params - The parameters to include in the request body. * @param options - Additional request options. */ rawRequest( method: string, path: string, params?: {[key: string]: unknown}, options?: Stripe.RawRequestOptions ): Promise>; /** * Parses webhook event payload into a ThinEvent and verifies webhook signature. * To get more information on the event, pass the id from the returned object to * `stripe.v2.core.events.retrieve()` * * @throws Stripe.errors.StripeSignatureVerificationError */ parseThinEvent: ( /** * Raw text body payload received from Stripe. */ payload: string | Buffer, /** * Value of the `stripe-signature` header from Stripe. * Typically a string. * * Note that this is typed to accept an array of strings * so that it works seamlessly with express's types, * but will throw if an array is passed in practice * since express should never return this header as an array, * only a string. */ header: string | Buffer | Array, /** * Your Webhook Signing Secret for this endpoint (e.g., 'whsec_...'). * You can get this [in your dashboard](https://dashboard.stripe.com/webhooks). */ secret: string, /** * Seconds of tolerance on timestamps. */ tolerance?: number, /** * Optional CryptoProvider to use for computing HMAC signatures. */ cryptoProvider?: Stripe.CryptoProvider, /** * Optional: timestamp to use when checking signature validity. Defaults to Date.now(). */ receivedAt?: number ) => Stripe.ThinEvent; } export default Stripe; }