import { View } from 'tns-core-modules/ui/core/view'; import { CardBrand, CardCommon, CreditCardViewBase, PaymentMethodCommon, Source, StripePaymentIntentCommon, StripePaymentIntentStatus, Token } from './stripe.common'; export * from "./stripe.common"; export declare class Stripe { constructor(apiKey: string); setStripeAccount(accountId: string): void; createToken(card: CardCommon, cb: (error: Error, token: Token) => void): void; createSource(card: CardCommon, cb: (error: Error, source: Source) => void): void; createPaymentMethod(card: CardCommon, cb: (error: Error, pm: PaymentMethod) => void): void; retrievePaymentIntent(clientSecret: string, cb: (error: Error, pm: StripePaymentIntent) => void): void; confirmSetupIntent(paymentMethodId: string, clientSecret: string, cb: (error: Error, pm: StripeSetupIntent) => void): void; authenticateSetupIntent(clientSecret: string, returnUrl: string, cb: (error: Error, pm: StripeSetupIntent) => void): void; confirmPaymentIntent(params: StripePaymentIntentParams, cb: (error: Error, pm: StripePaymentIntent) => void): void; authenticatePaymentIntent(clientSecret: string, returnUrl: string, cb: (error: Error, pm: StripePaymentIntent) => void): void; private _getAuthentificationContext; } export declare class Card implements CardCommon { native: STPCardParams; private _brand; private _last4; constructor(cardNumber: string, cardExpMonth: number, cardExpYear: number, cardCVC: string); static fromNative(card: STPCardParams): Card; static fromNativePaymentMethod(pm: STPPaymentMethod): Card; validateNumber(): boolean; validateCVC(): boolean; validateCard(): boolean; validateExpMonth(): boolean; validateExpiryDate(): boolean; readonly number: string; readonly cvc: string; readonly expMonth: number; readonly expYear: number; name: string; addressLine1: string; addressLine2: string; addressCity: string; addressZip: string; addressState: string; addressCountry: string; currency: string; readonly last4: string; readonly brand: CardBrand; private static toCardBrand; private static fromCardBrand; readonly fingerprint: string; readonly funding: string; readonly country: string; static cardImage(brand: CardBrand): any; } export declare class CreditCardView extends CreditCardViewBase { createNativeView(): STPPaymentCardTextField; initNativeView(): void; disposeNativeView(): void; readonly card: Card; } export declare class PaymentMethod implements PaymentMethodCommon { native: STPPaymentMethod; static fromNative(native: STPPaymentMethod): PaymentMethod; readonly id: string; readonly created: Date; readonly type: "card"; readonly billingDetails: object; readonly card: CardCommon; readonly customerId: string; readonly metadata: object; } declare class StripeIntent { native: STPSetupIntent | STPPaymentIntent; readonly created: Date; readonly clientSecret: string; readonly status: StripePaymentIntentStatus; readonly requiresAction: boolean; readonly isSuccess: boolean; readonly requiresConfirmation: boolean; readonly requiresCapture: boolean; readonly description: string; } export declare class StripePaymentIntent extends StripeIntent implements StripePaymentIntentCommon { native: STPPaymentIntent; static fromNative(native: STPPaymentIntent): StripePaymentIntent; static fromApi(json: any): StripePaymentIntent; readonly id: string; readonly amount: number; readonly currency: string; readonly captureMethod: "manual" | "automatic"; } export declare class StripePaymentIntentParams { clientSecret: string; paymentMethodParams: any; paymentMethodId: string; sourceParams: any; sourceId: string; returnURL: string; readonly native: STPPaymentIntentParams; } export declare class StripeSetupIntent extends StripeIntent { native: STPSetupIntent; static fromNative(native: STPSetupIntent): StripeSetupIntent; readonly id: string; readonly paymentMethodId: string; } export declare class StripeSetupIntentParams { native: STPSetupIntentConfirmParams; constructor(paymentMethodId: string, clientSecret: string); } export declare class StripeRedirectSession { native: STPRedirectContext; readonly state: StripeRedirectState; constructor(paymentIntent: StripePaymentIntent, cb: (error: Error, clientSecret: string) => void); startRedirectFlow(view: View): void; cancel(): void; } export declare const enum StripeRedirectState { NotStarted = 0, InProgress = 1, Cancelled = 2, Completed = 3 }