/** * The narrow slice of Stripe Embedded Components the fiat flow calls. Internal: * this package owns the native module and binds it in * `useStripeOnrampClient`, so nothing here is a host's to implement. It exists * as an interface, not inline calls, so the surfaces stay testable against a * stub — the same shape `test/stripe-sdk.stub.tsx` fills in. */ export interface StripeOnrampClient { hasLinkAccount: (email: string) => Promise; registerLinkUser: (user: StripeLinkRegistration) => Promise; authorize: (linkAuthIntentId: string) => Promise; authenticateUserWithToken: (linkAuthTokenClientSecret: string) => Promise; attachKycInfo: (info: StripeKycInfo) => Promise; /** * Stripe's own sheet over the KYC info already attached to the Link user. * `null` shows what Stripe holds; an address is passed only to re-present * after a prior call answered `UpdateAddress`. Named by the backend's * `allowedCalls`, so this is the one call the surface needs that the * capability did not already carry. */ presentKycInfoVerification: (updatedAddress: StripeKycAddress | null) => Promise; verifyIdentity: () => Promise; /** * Clears the SDK's cached authentication state. * * The SDK caches "this user is signed in" separately from the Link consumer session Stripe holds, * and the two diverge: the SDK skips the OTP while `registerWalletAddress` answers "No active Link * consumer is available." Stripe exposes no way to test for an active consumer session, so this is * the only lever — the failure is the signal, and logging out is what makes `authorize` prompt * again instead of silently reusing the dead state. */ logOut: () => Promise; isPlatformPaySupported: () => Promise; registerWalletAddress: (walletAddress: string, network: string) => Promise; collectPaymentMethod: (paymentMethod: 'PlatformPay', params: StripePlatformPayParams) => Promise; createCryptoPaymentToken: () => Promise; performCheckout: (onrampSessionId: string, provideClientSecret: () => Promise) => Promise; } export interface StripeKycAddress { line1?: string; line2?: string; city?: string; state?: string; postalCode?: string; country?: string; } export interface StripeKycInfo { firstName?: string; lastName?: string; dateOfBirth?: { day: number; month: number; year: number; }; idNumber?: string; address?: StripeKycAddress; } /** Stripe's three answers, kept verbatim: confirmed, wants a new address, or failed. */ export type StripeVerifyKycResult = { status: 'Confirmed'; error?: undefined; } | { status: 'UpdateAddress'; error?: undefined; } | { status?: undefined; error: StripeOnrampError; }; export interface StripePlatformPayParams { applePay: { merchantCountryCode: string; currencyCode: string; cartItems: Array<{ paymentType: 'Immediate'; label: string; amount: string; }>; requiredBillingContactFields?: string[]; }; } export type StripeVoidResult = { error?: StripeOnrampError; }; export type StripeCollectPaymentMethodResult = { displayData?: unknown; error?: StripeOnrampError; }; export type StripeCreateCryptoPaymentTokenResult = { cryptoPaymentToken?: string; error?: StripeOnrampError; }; export interface StripeLinkRegistration { email: string; phone: string; country: string; fullName?: string; } export interface StripeOnrampError { code: string; message?: string; onrampErrorType?: string; stripeErrorCode?: string; apiErrorCode?: string; apiErrorType?: string; developerMessage?: string; requestId?: string; } export type StripeHasLinkAccountResult = { hasLinkAccount: boolean; error?: undefined; } | { hasLinkAccount?: undefined; error: StripeOnrampError; }; export type StripeRegisterLinkUserResult = { customerId: string; error?: undefined; } | { customerId?: undefined; error: StripeOnrampError; }; export type StripeAuthorizeResult = { status: 'Consented'; customerId: string; error?: undefined; } | { status: 'Denied'; customerId?: undefined; error?: undefined; } | { status?: undefined; customerId?: undefined; error: StripeOnrampError; }; //# sourceMappingURL=stripeOnramp.d.ts.map