import { ListPaymentMethodsResponse, GetQuoteParams, Quote, ListAssetsResponse, Transaction, PaginationInfo, TransactionWithStages, SimulateBankTransferParams } from '@moonpay/platform-protocol/api'; export { AssetStatus, Attestation, GetQuoteParams, ListAssetsResponse, ListPaymentMethodsResponse, PaginationInfo, PaymentDisclosure, PaymentDisclosureId, PaymentMethodConfig, PaymentMethodType, PlatformAsset, Quote, SimulateBankTransferOutcome, SimulateBankTransferParams, SimulateSenderBankAccount, StoredCardPaymentMethod, StoredPaymentMethod, Transaction, TransactionWithStages } from '@moonpay/platform-protocol/api'; import { Customer } from '@moonpay/platform-protocol/api/customer'; export { Customer } from '@moonpay/platform-protocol/api/customer'; export { EnterpriseQuote } from '@moonpay/platform-protocol/api/enterprise'; export { CardResponse } from '@moonpay/platform-protocol/frames/add-card'; import * as ApplePayFrame$1 from '@moonpay/platform-protocol/frames/apple-pay'; export { ApplePayButtonSettings } from '@moonpay/platform-protocol/frames/apple-pay'; export { Cancellation as ChallengeCancellation, CompleteResult as ChallengeCompleteResult, ErrorCode as ChallengeErrorCode, ResolvedResult as ChallengeResolvedResult } from '@moonpay/platform-protocol/frames/challenge'; import * as GooglePayFrame$1 from '@moonpay/platform-protocol/frames/google-pay'; export { GooglePayButtonSettings } from '@moonpay/platform-protocol/frames/google-pay'; import { Connection } from '@moonpay/platform-protocol/models/connection'; export { Connection, ConnectionStatus, UnavailableReason } from '@moonpay/platform-protocol/models/connection'; import { Result } from '@moonpay/platform-protocol/result'; export { Result } from '@moonpay/platform-protocol/result'; import * as AddCardSdk from '@moonpay/platform-protocol/sdks/add-card'; export { Event as AddCardEvent, SetupError as SetupAddCardError } from '@moonpay/platform-protocol/sdks/add-card'; import * as ApplePaySdk from '@moonpay/platform-protocol/sdks/apple-pay'; export { Event as ApplePayEvent, SetupError as SetupApplePayError } from '@moonpay/platform-protocol/sdks/apple-pay'; import * as AuthSdk from '@moonpay/platform-protocol/sdks/auth'; export { Event as AuthEvent, SetupError as SetupAuthError } from '@moonpay/platform-protocol/sdks/auth'; import * as BuySdk from '@moonpay/platform-protocol/sdks/buy'; export { Event as BuyEvent, SetupError as SetupBuyError } from '@moonpay/platform-protocol/sdks/buy'; import * as BuyButtonSdk from '@moonpay/platform-protocol/sdks/buy-button'; export { Event as BuyButtonEvent, SetupError as SetupBuyButtonError } from '@moonpay/platform-protocol/sdks/buy-button'; import * as ChallengeSdk from '@moonpay/platform-protocol/sdks/challenge'; export { Event as ChallengeEvent, SetupError as SetupChallengeError } from '@moonpay/platform-protocol/sdks/challenge'; import * as ConnectSdk from '@moonpay/platform-protocol/sdks/connect'; export { Event as ConnectEvent } from '@moonpay/platform-protocol/sdks/connect'; import * as CustomerExportSdk from '@moonpay/platform-protocol/sdks/customer-export'; export { Event as CustomerExportEvent, SetupError as SetupCustomerExportError } from '@moonpay/platform-protocol/sdks/customer-export'; import * as GooglePaySdk from '@moonpay/platform-protocol/sdks/google-pay'; export { Event as GooglePayEvent, SetupError as SetupGooglePayError } from '@moonpay/platform-protocol/sdks/google-pay'; import * as WidgetSdk from '@moonpay/platform-protocol/sdks/widget'; export { SetupError as SetupWidgetError, Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget'; import { FrameTransport, FrameOptions, PresentationMode, ThemeOptions, Credentials, GetCredentialsError, GetPaymentMethodsParams, ListAssetsParams, ListTransactionsParams } from '@moonpay/platform-sdk-core'; export { Credentials, CustomTheme, GetCredentialsError, GetPaymentMethodsParams, HexColor, ListAssetsParams, ThemeOptions } from '@moonpay/platform-sdk-core'; import { GetPaymentMethodsError, GetQuoteError, GetAssetsError, GetTransactionsError, SimulateBankTransferError, DevPlatformApiError, GetCustomerError, SubmitCustomerKycError, GetCustomerUploadUrlError, SubmitCustomerFilesError, CreateIdentityError, GetIdentityError, UpdateIdentityError, VerifyIdentityError, GetIdentityUploadUrlError, SubmitIdentityFilesError } from '@moonpay/platform-protocol/api/errors'; import { UpdateIdentityRequestBody, IdentityFileUploadUrlRequestBody, IdentityFileUploadUrl, SubmitIdentityFilesRequestBody, CreateIdentityRequestBody, Identity, IdentityVerificationResponse } from '@moonpay/platform-protocol/api/identity'; import { ResetConnectionError } from '@moonpay/platform-protocol/sdks/reset'; import { ViewStyle } from 'react-native'; import WebView, { WebViewProps } from 'react-native-webview'; import { ProtocolMessage } from '@moonpay/platform-protocol/protocol'; import { RefObject, ReactNode } from 'react'; /** * Transport surface the RN SDK passes around internally. `WebViewTransport` * is the production implementation; tests substitute fakes. */ interface RNFrameTransport extends FrameTransport { readonly url: string; readonly options: FrameOptions | null; attachWebView(ref: RefObject): void; handleWebViewMessage(data: string): void; } /** * FrameTransport implementation for React Native using react-native-webview. * * Unlike the web IframeTransport, the WebView is rendered declaratively via * React components. This transport bridges the imperative FrameTransport * interface to a WebView ref. */ declare class WebViewTransport implements RNFrameTransport { private webViewRef; private handlers; private _url; private _options; /** Called by the frame component when it mounts the WebView. */ attachWebView(ref: RefObject): void; /** Called by the WebView's onMessage prop to route incoming messages. */ handleWebViewMessage(data: string): void; get url(): string; get options(): FrameOptions | null; create(url: string, options: FrameOptions): void; sendMessage(message: ProtocolMessage): void; onMessage(handler: (msg: ProtocolMessage) => void): () => void; dispose(): void; } interface SetupAddCardOptions { /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for add-card frame lifecycle events. */ onEvent?: (event: AddCardSdk.Event) => void; } interface AddCardFrame { dispose(): void; } /** @deprecated Render `` instead. The Apple Pay frame is being removed. */ interface SetupApplePayOptions { /** Quote signature from getQuote(). */ quote: string; /** Partner-assigned identifier for this transaction attempt. */ externalTransactionId?: string; /** Styling for the standalone Apple Pay button. Passed through to the frame, which is authoritative. */ applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for Apple Pay lifecycle events. */ onEvent?: (event: ApplePaySdk.Event) => void; } /** @deprecated Render `` instead. The Apple Pay frame is being removed. */ interface ApplePayFrame { /** Update the quote (e.g., after expiry). */ setQuote(signature: string): void; dispose(): void; } interface SetupAuthOptions { /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for auth frame lifecycle events. */ onEvent?: (event: AuthSdk.Event) => void; } interface AuthFrame { dispose(): void; } /** @deprecated Use `SetupBuyButtonOptions` with `headless: true`. */ interface SetupBuyOptions { /** Quote signature from getQuote(). */ quote: string; /** Partner-assigned identifier for this transaction attempt. */ externalTransactionId?: string; /** Callback for buy frame lifecycle events. */ onEvent?: (event: BuySdk.Event) => void; } /** @deprecated Use `BuyButtonFrame` from `setupBuyButton({ headless: true })`. */ interface BuyFrame { /** Update the quote (e.g., after expiry). */ setQuote(signature: string): void; dispose(): void; } interface SetupBuyButtonOptions { /** Quote signature from getQuote(). */ quote: string; /** Partner-assigned identifier for this transaction attempt. */ externalTransactionId?: string; /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. */ applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings; /** * Styling for the Google Pay button variant. Passed through to the frame, which is * authoritative. Ignored when `headless` is set, since no button renders. */ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** * The link back to your app after the customer finishes in another app that * the payment method opens (for example Cash App), such as * `myapp://moonpay-return`. Without it the customer switches back to your * app themselves. */ linkReturnUrl?: string; /** * Run the frame hidden, with no button: it processes the quote on load, the * way the deprecated `setupBuy` did. */ headless?: boolean; /** Callback for buy-button frame lifecycle events. */ onEvent?: (event: BuyButtonSdk.Event) => void; } interface BuyButtonFrame { /** Update the quote (e.g., after expiry). */ setQuote(signature: string): void; dispose(): void; } interface SetupChallengeOptions { /** Full challenge URL received from a frame's `challenge` event. */ url: string; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** * Finish an Apple Pay / Google Pay buy on your own buy button instead of * inside the challenge frame. When the buy challenges are resolved, the * frame sends `resolved` instead of `complete` and the SDK closes its sheet: * show your buy button again so the customer taps it to pay. If the frame * can't hand the token over, it still finishes with `complete`. * Defaults to `false`. */ resume?: boolean; /** Callback for challenge frame lifecycle events. */ onEvent?: (event: ChallengeSdk.Event) => void; } interface ChallengeFrame { dispose(): void; } interface ConnectOptions { /** Theme for this connect frame. Each option set here overrides the same option on the provider-level `theme`. */ theme?: ThemeOptions; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for connect lifecycle events. */ onEvent?: (event: ConnectSdk.Event) => void; } interface ConnectFrame { dispose(): void; } interface GetConnectionOptions { /** * Pass `true` for headless / Identity-API integrations so the check * frame opts out of KYC-based statuses. Legal (`termsAcceptanceRequired`) * is always surfaced regardless. Defaults to `false`. */ skipKyc?: boolean; } interface SetupCustomerExportOptions { /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for customer-export frame lifecycle events. */ onEvent?: (event: CustomerExportSdk.Event) => void; } interface CustomerExportFrame { dispose(): void; } /** @deprecated Render `` instead. The Google Pay frame is being removed. */ interface SetupGooglePayOptions { /** Quote signature from getQuote(). */ quote: string; /** Partner-assigned identifier for this transaction attempt. */ externalTransactionId?: string; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for Google Pay lifecycle events. */ onEvent?: (event: GooglePaySdk.Event) => void; } /** @deprecated Render `` instead. The Google Pay frame is being removed. */ interface GooglePayFrame { /** Update the quote (e.g., after expiry). */ setQuote(signature: string): void; dispose(): void; } interface SetupWidgetOptions { /** Quote signature from getQuote(). */ quote: string; /** Partner-assigned identifier for this transaction attempt. */ externalTransactionId?: string; /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */ presentation?: PresentationMode; /** Callback for widget lifecycle events. */ onEvent?: (event: WidgetSdk.Event) => void; } interface WidgetFrame { dispose(): void; } interface RNClient { /** * Probe the customer's connection state via the headless check-connection * frame. Returns the `Connection` discriminated union and populates the * internal context with bootstrap `accessToken` / `clientToken` for any * status that carries credentials (`active`, `connectionRequired`). * * A `connectionRequired` result may carry `mismatch: true` when the * session's email and phone number resolve to different MoonPay * customers — partners can branch on it to route the customer through * Connect proactively, before rendering payment UI. */ getConnection(options?: GetConnectionOptions): Promise>; connect(options: ConnectOptions): Promise>; /** * Launch the auth frame — the lighter-weight counterpart to `connect()` * for headless / Identity-API partners. Requires a `clientToken` to be * present in the client's context, which is populated automatically by a * prior `getConnection()` call that returned `connectionRequired`. * Call `getConnection()` first; if its status is `connectionRequired`, * call `setupAuth()` to drive the customer through email/OTP. */ setupAuth(options: SetupAuthOptions): Promise>; /** * Returns the connected customer's `{ accessToken, clientToken }` so you can * forward the `accessToken` to your own backend for customer-scoped Platform * API calls (e.g. server-side quote fetching). * * Advanced escape hatch — the SDK otherwise keeps these credentials internal. * The `accessToken` is short-lived and scoped to the connected customer. Errs * with `noActiveSession` until a customer session exists — call * `getConnection()` (and `connect()` / `setupAuth()` where needed) first. * Synchronous — returns a `Result`, not a Promise. */ getCredentials(): Result; getPaymentMethods(params?: GetPaymentMethodsParams): Promise>; getQuote(params: GetQuoteParams): Promise>; /** * Lists crypto assets (CeFi and DeFi) available for purchase. DeFi tokens are * returned with `status.verified: false`; quote them by `caip19` rather than `code`. */ getAssets(params?: ListAssetsParams): Promise>; listTransactions(params?: ListTransactionsParams): Promise>; getTransaction(id: string): Promise>; /** Simulate bank-transfer settlement for a test-mode transaction (sandbox only). */ simulateBankTransfer(id: string, params: SimulateBankTransferParams): Promise>; setupWidget(options: SetupWidgetOptions): Promise>; /** @deprecated Render `` instead. It renders the Apple Pay button for an Apple Pay quote. The Apple Pay frame is being removed. */ setupApplePay(options: SetupApplePayOptions): Promise>; /** @deprecated Use `setupBuyButton({ ...options, headless: true })` or ``. The buy frame is being removed. */ setupBuy(options: SetupBuyOptions): Promise>; /** @deprecated Render instead — it mounts inline where you place it. */ setupBuyButton(options: SetupBuyButtonOptions): Promise>; /** @deprecated Render `` instead. It renders the Google Pay button for a Google Pay quote. The Google Pay frame is being removed. */ setupGooglePay(options: SetupGooglePayOptions): Promise>; deletePaymentMethod(id: string): Promise>; /** * Clears the customer's MoonPay connection for this partner by running the * reset frame. Resolves when the reset completes or times out (5s). * Call this after clearing your own local auth state (the client reference * can be captured before disposal since the session token is baked in). */ resetConnection(): Promise>; setupChallenge(options: SetupChallengeOptions): Promise>; setupAddCard(options: SetupAddCardOptions): Promise>; setupCustomerExport(options: SetupCustomerExportOptions): Promise>; getCustomer(id: string): Promise>; submitCustomerKyc(id: string, body: UpdateIdentityRequestBody): Promise>; getCustomerUploadUrl(id: string, body: IdentityFileUploadUrlRequestBody): Promise>; submitCustomerFiles(id: string, body: SubmitIdentityFilesRequestBody): Promise>; /** @deprecated Customers are created automatically now — call `getCustomer` directly instead. */ createIdentity(body: CreateIdentityRequestBody): Promise>; /** @deprecated Use `getCustomer` instead. */ getIdentity(id: string): Promise>; /** @deprecated Use `submitCustomerKyc` instead. */ updateIdentity(id: string, body: UpdateIdentityRequestBody): Promise>; /** @deprecated No longer needed — Customer API verification has no direct replacement call. */ verifyIdentity(id: string): Promise>; /** @deprecated Use `getCustomerUploadUrl` instead. */ getIdentityUploadUrl(id: string, body: IdentityFileUploadUrlRequestBody): Promise>; /** @deprecated Use `submitCustomerFiles` instead. */ submitIdentityFiles(id: string, body: SubmitIdentityFilesRequestBody): Promise>; } /** * The enterprise client exposes only the payment frames. Quotes, customers * and transactions are API-driven for enterprise — call them from your server. * For a buy without a visible button, use `setupBuyButton({ headless: true })`. */ type RNEnterpriseClient = Pick; interface MoonPayAddCardProps { /** Callback for add-card lifecycle events. */ onEvent?: (event: AddCardSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline add-card frame — embed card entry in your own layout/animation. */ declare function MoonPayAddCard({ onEvent, style, webViewProps }: MoonPayAddCardProps): JSX.Element; /** @deprecated Use `MoonPayBuyButtonProps`. The Apple Pay frame is being removed. */ interface MoonPayApplePayButtonProps { /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */ quote: string; /** Partner-assigned identifier for this transaction attempt. Mount-time only. */ externalTransactionId?: string; /** Styling for the Apple Pay button. Passed through to the frame, which is authoritative. Mount-time only. */ applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings; /** Callback for Apple Pay lifecycle events. */ onEvent?: (event: ApplePaySdk.Event) => void; /** Container style. Defaults to height 48. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; /** * Called with the underlying WebView instance once the button mounts, and * with `null` on unmount. The Apple Pay button is rendered inside this * WebView; use the instance to inject JS into the frame (e.g. via * `injectJavaScript`). */ onRef?: (webView: WebView | null) => void; } /** * Inline Apple Pay button. Render it wherever it should appear in your layout. * @deprecated Render `` instead. It renders the Apple Pay button for an Apple Pay quote. The Apple Pay frame is being removed. */ declare function MoonPayApplePayButton({ quote, externalTransactionId, applePayButtonSettings, onEvent, style, webViewProps, onRef, }: MoonPayApplePayButtonProps): JSX.Element; interface MoonPayAuthProps { /** Callback for auth lifecycle events. */ onEvent?: (event: AuthSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** * Inline auth frame for headless / Identity-API integrations. Requires a clientToken in context — * call getConnection() (or render ) first; if it resolves with * `connectionRequired`, mount this component. Emits an error event otherwise. */ declare function MoonPayAuth({ onEvent, style, webViewProps }: MoonPayAuthProps): JSX.Element; interface MoonPayBuyButtonProps { /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */ quote: string; /** Partner-assigned identifier for this transaction attempt. Mount-time only. */ externalTransactionId?: string; /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. Mount-time only. */ applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings; /** Styling for the Google Pay button variant. Passed through to the frame, which is authoritative. Ignored when `headless` is set. Mount-time only. */ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings; /** * The link back to your app after the customer finishes in another app that * the payment method opens (for example Cash App), such as * `myapp://moonpay-return`. Without it the customer switches back to your * app themselves. Mount-time only. */ linkReturnUrl?: string; /** * Render nothing visible and process the quote on load, the way the * deprecated `` did. Mount-time only. */ headless?: boolean; /** Callback for buy button lifecycle events. */ onEvent?: (event: BuyButtonSdk.Event) => void; /** Container style. Defaults to height 48. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline card/buy button. Render it wherever it should appear in your layout. */ declare function MoonPayBuyButton({ quote, externalTransactionId, applePayButtonSettings, googlePayButtonSettings, linkReturnUrl, headless, onEvent, style, webViewProps, }: MoonPayBuyButtonProps): JSX.Element; interface MoonPayBuyFrameProps { /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */ quote: string; /** Partner-assigned identifier for this transaction attempt. Mount-time only. */ externalTransactionId?: string; /** Callback for buy frame lifecycle events. */ onEvent?: (event: BuySdk.Event) => void; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** * Headless buy frame (renders nothing visible). The declarative alternative to client.setupBuy(). * @deprecated Render `` instead. The buy frame is being removed. */ declare function MoonPayBuyFrame({ quote, externalTransactionId, onEvent, webViewProps, }: MoonPayBuyFrameProps): JSX.Element; interface MoonPayChallengeProps { /** Full challenge URL received from a frame's `challenge` event. Mount-time only. */ url: string; /** * Finish an Apple Pay / Google Pay buy on your own buy button instead of * inside the challenge frame. When the buy challenges are resolved, the * frame sends `resolved` instead of `complete`: unmount this component and * show your buy button again so the customer taps it to pay. If the frame * can't hand the token over, it still finishes with `complete`. * Defaults to `false`. Mount-time only. */ resume?: boolean; /** Callback for challenge lifecycle events. */ onEvent?: (event: ChallengeSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline 3DS/challenge frame. Mount it when a payment frame emits a `challenge` event. */ declare function MoonPayChallenge({ url, resume, onEvent, style, webViewProps, }: MoonPayChallengeProps): JSX.Element; interface MoonPayConnectProps { /** Theme for this connect frame. Each option set here overrides the same option on the provider-level `theme`. Mount-time only. */ theme?: ThemeOptions; /** Callback for connect lifecycle events. */ onEvent?: (event: ConnectSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline connect frame. On an active completion, credentials are applied to the shared client automatically. */ declare function MoonPayConnect({ theme, onEvent, style, webViewProps, }: MoonPayConnectProps): JSX.Element; type ConnectionCheckEvent = { kind: 'complete'; payload: Connection; } | { kind: 'error'; payload: { message: string; }; }; type ConnectionResetEvent = { kind: 'complete'; } | { kind: 'error'; payload: { message: string; }; }; interface MoonPayConnectionCheckProps { /** Pass `true` for headless / Identity-API integrations. Mount-time only. */ skipKyc?: boolean; /** Emits `complete` with the Connection, or `error`. */ onEvent?: (event: ConnectionCheckEvent) => void; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** * Headless connection check (renders nothing visible). The declarative * alternative to client.getConnection() — on an active connection, * credentials are applied to the shared client automatically. */ declare function MoonPayConnectionCheck({ skipKyc, onEvent, webViewProps, }: MoonPayConnectionCheckProps): JSX.Element; interface MoonPayConnectionResetProps { /** Callback for connection reset lifecycle events. */ onEvent?: (event: ConnectionResetEvent) => void; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Headless reset frame (renders nothing visible). The declarative alternative to client.resetConnection(). */ declare function MoonPayConnectionReset({ onEvent, webViewProps, }: MoonPayConnectionResetProps): JSX.Element; interface MoonPayCustomerExportProps { /** Callback for customer-export lifecycle events. */ onEvent?: (event: CustomerExportSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline customer-export consent frame — embed export consent capture in your own layout. */ declare function MoonPayCustomerExport({ onEvent, style, webViewProps, }: MoonPayCustomerExportProps): JSX.Element; /** @deprecated Use `MoonPayBuyButtonProps`. The Google Pay frame is being removed. */ interface MoonPayGooglePayButtonProps { /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */ quote: string; /** Partner-assigned identifier for this transaction attempt. Mount-time only. */ externalTransactionId?: string; /** Callback for Google Pay lifecycle events. */ onEvent?: (event: GooglePaySdk.Event) => void; /** Container style. Defaults to height 48. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** * Inline Google Pay button. Render it wherever it should appear in your layout. * @deprecated Render `` instead. It renders the Google Pay button for a Google Pay quote. The Google Pay frame is being removed. */ declare function MoonPayGooglePayButton({ quote, externalTransactionId, onEvent, style, webViewProps, }: MoonPayGooglePayButtonProps): JSX.Element; interface MoonPayWidgetProps { /** Quote signature from getQuote(). Mount-time only — changing it reloads the widget. */ quote: string; /** Partner-assigned identifier for this transaction attempt. Mount-time only. */ externalTransactionId?: string; /** Callback for widget lifecycle events. */ onEvent?: (event: WidgetSdk.Event) => void; /** Container style. Defaults to flex: 1. */ style?: ViewStyle; /** Advanced props forwarded to the underlying react-native-webview. `ref`, `source`, and `onMessage` are SDK-managed. */ webViewProps?: Partial; } /** Inline widget frame. Render it wherever it should appear in your layout. */ declare function MoonPayWidget({ quote, externalTransactionId, onEvent, style, webViewProps, }: MoonPayWidgetProps): JSX.Element; interface MoonPayFrameProps { /** The transport instance managing this frame's communication. */ transport: RNFrameTransport; /** Whether this is a hidden utility frame (zero height). */ hidden?: boolean; /** Optional style overrides for the container view. */ style?: ViewStyle; /** * Advanced: extra props forwarded to the underlying react-native-webview. * `ref`, `source`, and `onMessage` are managed by the SDK and cannot be * overridden; all other props (including `originWhitelist`) may be set here. */ webViewProps?: Partial; /** * Called with the underlying WebView instance once it mounts, and with `null` * on unmount. Lets callers inject JS into the frame (e.g. `injectJavaScript`). */ onRef?: (webView: WebView | null) => void; } /** * Reusable React Native component that renders a MoonPay frame as a WebView. * Bridges the WebViewTransport to the actual WebView instance. */ declare function MoonPayFrame({ transport, hidden, style, webViewProps, onRef, }: MoonPayFrameProps): JSX.Element | null; interface MoonPayProviderProps { /** * Session token from your server (via `createSession`). Optional — omit it and * call `initialize(sessionToken)` from `useMoonPay()` once you've fetched it. * When provided, this prop takes precedence over an imperatively-set token. */ sessionToken?: string; apiBaseUrl?: string; frameBaseUrl?: string; /** Theme applied to every visible MoonPay frame (connect, widget, Apple/Google Pay, …). */ theme?: ThemeOptions; children: ReactNode; } declare function MoonPayProvider({ sessionToken: sessionTokenProp, apiBaseUrl, frameBaseUrl, theme, children, }: MoonPayProviderProps): JSX.Element; interface MoonPayEnterpriseProviderProps { /** Client token from your server. Authorizes every enterprise frame. */ clientToken: string; frameBaseUrl?: string; /** Theme applied to every visible MoonPay frame. */ theme?: ThemeOptions; children: ReactNode; } /** * Provider for enterprise integrations. Exposes only the payment frames — * `` (including `headless`), ``, * `` and their `setupX` methods via `useMoonPayEnterprise()`. * Other frame components emit an error event saying they're unavailable. */ declare function MoonPayEnterpriseProvider({ clientToken, frameBaseUrl, theme, children, }: MoonPayEnterpriseProviderProps): JSX.Element; declare function useMoonPay(): { client: RNClient; /** Set or replace the session token after mount. */ initialize: (sessionToken: string) => void; /** True once a session token (via prop or `initialize()`) is available. */ isInitialized: boolean; }; declare function useMoonPayEnterprise(): { client: RNEnterpriseClient; }; export { type AddCardFrame, type ApplePayFrame, type AuthFrame, type BuyButtonFrame, type BuyFrame, type ChallengeFrame, type ConnectFrame, type ConnectOptions, type ConnectionCheckEvent, type ConnectionResetEvent, type CustomerExportFrame, type GetConnectionOptions, type GooglePayFrame, MoonPayAddCard, type MoonPayAddCardProps, MoonPayApplePayButton, type MoonPayApplePayButtonProps, MoonPayAuth, type MoonPayAuthProps, MoonPayBuyButton, type MoonPayBuyButtonProps, MoonPayBuyFrame, type MoonPayBuyFrameProps, MoonPayChallenge, type MoonPayChallengeProps, MoonPayConnect, type MoonPayConnectProps, MoonPayConnectionCheck, type MoonPayConnectionCheckProps, MoonPayConnectionReset, type MoonPayConnectionResetProps, MoonPayCustomerExport, type MoonPayCustomerExportProps, MoonPayEnterpriseProvider, type MoonPayEnterpriseProviderProps, MoonPayFrame, type MoonPayFrameProps, MoonPayGooglePayButton, type MoonPayGooglePayButtonProps, MoonPayProvider, type MoonPayProviderProps, MoonPayWidget, type MoonPayWidgetProps, type RNClient, type RNEnterpriseClient, type SetupAddCardOptions, type SetupApplePayOptions, type SetupAuthOptions, type SetupBuyButtonOptions, type SetupBuyOptions, type SetupChallengeOptions, type SetupCustomerExportOptions, type SetupGooglePayOptions, type SetupWidgetOptions, WebViewTransport, type WidgetFrame, useMoonPay, useMoonPayEnterprise };