Options
All
  • Public
  • Public/Protected
  • All
Menu

stripe-identity-react-native

Index

Type aliases

ErrorType: "api_connection_error" | "api_error" | "authentication_error" | "card_error" | "idempotency_error" | "invalid_request_error" | "rate_limit_error"
IdentityVerificationSheetOptions: { brandLogo: ImageResolvedAssetSource; ephemeralKeySecret: string; sessionId: string }

Type declaration

  • brandLogo: ImageResolvedAssetSource
  • ephemeralKeySecret: string
  • sessionId: string
IdentityVerificationSheetResult: { error?: StripeError; status: IdentityVerificationSheetStatus }

Type declaration

IdentityVerificationSheetStatus: "FlowCompleted" | "FlowCanceled" | "FlowFailed"
StripeError: { code: IdentityVerificationSheetStatus; declineCode?: string; localizedMessage?: string; message: string; stripeErrorCode?: string; type?: ErrorType }

Type declaration

Functions

  • useStripeIdentity hook.

    This hook provides access to the present method, verification status, and loading flag.

    example
    const fechOptionsProvider = async () => {
    const response = await fetch('http://${YOUR_SERVER_BASE_URL}/create-verification-session');
    const { id, ephemeral_key_secret } = await response.json();
    return {
    sessionId: id,
    ephemeralKeySecret: ephemeral_key_secret,
    brandLogo: Image.resolveAssetSource(logo),
    };
    };

    const { present, status, loading, error } = useStripeIdentity(fetchOptionsProvider)

    Parameters

    Returns { error: undefined | StripeError; loading: boolean; present: () => Promise<void>; status: undefined | IdentityVerificationSheetStatus }

Generated using TypeDoc