import Stripe from "stripe"; import { AuthorizePaymentInput, AuthorizePaymentOutput, CancelPaymentInput, CancelPaymentOutput, CapturePaymentInput, CapturePaymentOutput, CreateAccountHolderInput, CreateAccountHolderOutput, DeleteAccountHolderInput, DeleteAccountHolderOutput, DeletePaymentInput, DeletePaymentOutput, GetPaymentStatusInput, GetPaymentStatusOutput, InitiatePaymentInput, InitiatePaymentOutput, ListPaymentMethodsInput, ListPaymentMethodsOutput, ProviderWebhookPayload, RefundPaymentInput, RefundPaymentOutput, RetrievePaymentInput, RetrievePaymentOutput, SavePaymentMethodInput, SavePaymentMethodOutput, UpdateAccountHolderInput, UpdateAccountHolderOutput, UpdatePaymentInput, UpdatePaymentOutput, WebhookActionResult } from "@medusajs/framework/types"; import { AbstractPaymentProvider } from "@medusajs/framework/utils"; import { PaymentIntentOptions, StripeOptions } from "../types"; type StripeIndeterminateState = { indeterminate_due_to: string; }; type StripeErrorData = Stripe.PaymentIntent | StripeIndeterminateState; type HandledErrorType = { retry: true; } | { retry: false; data: StripeErrorData; }; declare abstract class StripeBase extends AbstractPaymentProvider { protected readonly options_: StripeOptions; protected stripe_: Stripe; protected container_: Record; static validateOptions(options: StripeOptions): void; protected constructor(cradle: Record, options: StripeOptions); abstract get paymentIntentOptions(): PaymentIntentOptions; get options(): StripeOptions; normalizePaymentIntentParameters(extra?: Record): Partial; handleStripeError(error: any): HandledErrorType; executeWithRetry(apiCall: () => Promise, maxRetries?: number, baseDelay?: number, currentAttempt?: number): Promise; getPaymentStatus(input: GetPaymentStatusInput): Promise; initiatePayment({ currency_code, amount, data, context, }: InitiatePaymentInput): Promise; authorizePayment(input: AuthorizePaymentInput): Promise; cancelPayment({ data, context, }: CancelPaymentInput): Promise; capturePayment({ data, context, }: CapturePaymentInput): Promise; deletePayment(input: DeletePaymentInput): Promise; refundPayment({ amount, data, context, }: RefundPaymentInput): Promise; retrievePayment({ data, }: RetrievePaymentInput): Promise; updatePayment({ data, currency_code, amount, context, }: UpdatePaymentInput): Promise; createAccountHolder({ context, }: CreateAccountHolderInput): Promise; updateAccountHolder({ context, }: UpdateAccountHolderInput): Promise; deleteAccountHolder({ context, }: DeleteAccountHolderInput): Promise; listPaymentMethods({ context, }: ListPaymentMethodsInput): Promise; savePaymentMethod({ context, data, }: SavePaymentMethodInput): Promise; private getStatus; getWebhookActionAndData(webhookData: ProviderWebhookPayload["payload"]): Promise; /** * Constructs Stripe Webhook event * @param {object} data - the data of the webhook request: req.body * ensures integrity of the webhook event * @return {object} Stripe Webhook event */ constructWebhookEvent(data: ProviderWebhookPayload["payload"]): Stripe.Event; protected buildError(message: string, error: Error): Error; } export default StripeBase; //# sourceMappingURL=stripe-base.d.ts.map