@sergdudko/stripe-js
Version:
Additional methods for working with stripe-js
19 lines (18 loc) • 1.85 kB
TypeScript
/**
* additional stripe methods
*/
export declare class StripeExtension {
constructor(apiKey: string);
_apiKey: string;
confirmPaymentIntentByCard: (this: StripeExtension, paymentIntentSecret: string, paymentMethodId: string, returnUrl?: string) => Promise<import("@stripe/stripe-js").PaymentIntentResult["paymentIntent"] | undefined>;
confirmPaymentIntentByPaymentMethod: (this: StripeExtension, paymentIntentSecret: string, paymentMethodId: string, returnUrl?: string) => Promise<import("@stripe/stripe-js").PaymentIntentResult["paymentIntent"] | undefined>;
addSourceToCustomer: (this: StripeExtension, token: string, customerId: string, ephemeralKey: string) => Promise<import("@stripe/stripe-js").Card | undefined>;
deleteSourceFromCustomer: (this: StripeExtension, sourceId: string, customerId: string, ephemeralKey: string) => Promise<import("@stripe/stripe-js").Card | undefined>;
getAllCards: (this: StripeExtension, customerId: string, ephemeralKey: string) => Promise<any>;
getCustomer: (this: StripeExtension, customerId: string, ephemeralKey: string) => Promise<any>;
setDefaultCard: (this: StripeExtension, cardId: string, customerId: string, ephemeralKey: string) => Promise<any>;
addPaymentMethodToCustomer: (this: StripeExtension, paymentMethodId: string, customerId: string, ephemeralKey: string) => Promise<import("@stripe/stripe-js").PaymentMethod | undefined>;
deletePaymentMethodFromCustomer: (this: StripeExtension, paymentMethodId: string, ephemeralKey: string) => Promise<import("@stripe/stripe-js").PaymentMethod | undefined>;
getAllPaymentMethods: (this: StripeExtension, customerId: string, ephemeralKey: string) => Promise<any>;
setDefaultPaymentMethod: (this: StripeExtension, paymentMethodId: string, customerId: string, ephemeralKey: string) => Promise<any>;
}