• Preparing search index...
  • The search index is not available
@stripe/stripe-react-native
  • @stripe/stripe-react-native
  • useStripe

Function useStripe

  • useStripe(): {
        retrievePaymentIntent: (
            clientSecret: string,
        ) => Promise<RetrievePaymentIntentResult>;
        retrieveSetupIntent: (
            clientSecret: string,
        ) => Promise<RetrieveSetupIntentResult>;
        confirmPayment: (
            paymentIntentClientSecret: string,
            data?: PaymentIntent.ConfirmParams,
            options?: CreateOptions,
        ) => Promise<ConfirmPaymentResult>;
        createPaymentMethod: (
            data: PaymentMethod.CreateParams,
            options?: CreateOptions,
        ) => Promise<CreatePaymentMethodResult>;
        handleNextAction: (
            paymentIntentClientSecret: string,
            returnURL?: string,
        ) => Promise<HandleNextActionResult>;
        handleNextActionForSetup: (
            setupIntentClientSecret: string,
            returnURL?: string,
        ) => Promise<HandleNextActionForSetupResult>;
        confirmSetupIntent: (
            paymentIntentClientSecret: string,
            data: PaymentIntent.ConfirmParams,
            options?: CreateOptions,
        ) => Promise<ConfirmSetupIntentResult>;
        createTokenForCVCUpdate: (
            cvc: string,
        ) => Promise<CreateTokenForCVCUpdateResult>;
        handleURLCallback: (url: string) => Promise<boolean>;
        confirmPaymentSheetPayment: () => Promise<ConfirmPaymentSheetPaymentResult>;
        presentPaymentSheet: (
            options?: PaymentSheet.PresentOptions,
        ) => Promise<PresentPaymentSheetResult>;
        initPaymentSheet: (
            params: PaymentSheet.SetupParams,
        ) => Promise<InitPaymentSheetResult>;
        createToken: (params: Token.CreateParams) => Promise<CreateTokenResult>;
        collectBankAccountForPayment: (
            clientSecret: string,
            params: PaymentMethod.CollectBankAccountParams,
        ) => Promise<CollectBankAccountForPaymentResult>;
        collectBankAccountForSetup: (
            clientSecret: string,
            params: PaymentMethod.CollectBankAccountParams,
        ) => Promise<CollectBankAccountForSetupResult>;
        verifyMicrodepositsForPayment: (
            clientSecret: string,
            params: VerifyMicrodepositsParams,
        ) => Promise<VerifyMicrodepositsForPaymentResult>;
        verifyMicrodepositsForSetup: (
            clientSecret: string,
            params: VerifyMicrodepositsParams,
        ) => Promise<VerifyMicrodepositsForSetupResult>;
        canAddCardToWallet: (
            params: CanAddCardToWalletParams,
        ) => Promise<CanAddCardToWalletResult>;
        collectBankAccountToken: (
            clientSecret: string,
            params?: CollectBankAccountTokenParams,
        ) => Promise<FinancialConnections.TokenResult>;
        collectFinancialConnectionsAccounts: (
            clientSecret: string,
            params?: CollectFinancialConnectionsAccountsParams,
        ) => Promise<SessionResult>;
        resetPaymentSheetCustomer: () => Promise<null>;
        isPlatformPaySupported: (
            params?: { googlePay?: IsGooglePaySupportedParams },
        ) => Promise<boolean>;
        confirmPlatformPaySetupIntent: (
            clientSecret: string,
            params: PlatformPay.ConfirmParams,
        ) => Promise<PlatformPay.ConfirmSetupIntentResult>;
        confirmPlatformPayPayment: (
            clientSecret: string,
            params: PlatformPay.ConfirmParams,
        ) => Promise<PlatformPay.ConfirmPaymentResult>;
        dismissPlatformPay: () => Promise<boolean>;
        createPlatformPayPaymentMethod: (
            params: PaymentMethodParams,
        ) => Promise<PaymentMethodResult>;
        createPlatformPayToken: (
            params: PaymentMethodParams,
        ) => Promise<PlatformPay.TokenResult>;
        updatePlatformPaySheet: (
            params: {
                applePay: {
                    cartItems: PlatformPay.CartSummaryItem[];
                    shippingMethods: ShippingMethod[];
                    errors: ApplePaySheetError[];
                };
            },
        ) => Promise<{ error?: StripeError<PlatformPayError> }>;
        openPlatformPaySetup: () => Promise<void>;
    }

    useStripe hook

    Returns {
        retrievePaymentIntent: (
            clientSecret: string,
        ) => Promise<RetrievePaymentIntentResult>;
        retrieveSetupIntent: (
            clientSecret: string,
        ) => Promise<RetrieveSetupIntentResult>;
        confirmPayment: (
            paymentIntentClientSecret: string,
            data?: PaymentIntent.ConfirmParams,
            options?: CreateOptions,
        ) => Promise<ConfirmPaymentResult>;
        createPaymentMethod: (
            data: PaymentMethod.CreateParams,
            options?: CreateOptions,
        ) => Promise<CreatePaymentMethodResult>;
        handleNextAction: (
            paymentIntentClientSecret: string,
            returnURL?: string,
        ) => Promise<HandleNextActionResult>;
        handleNextActionForSetup: (
            setupIntentClientSecret: string,
            returnURL?: string,
        ) => Promise<HandleNextActionForSetupResult>;
        confirmSetupIntent: (
            paymentIntentClientSecret: string,
            data: PaymentIntent.ConfirmParams,
            options?: CreateOptions,
        ) => Promise<ConfirmSetupIntentResult>;
        createTokenForCVCUpdate: (
            cvc: string,
        ) => Promise<CreateTokenForCVCUpdateResult>;
        handleURLCallback: (url: string) => Promise<boolean>;
        confirmPaymentSheetPayment: () => Promise<ConfirmPaymentSheetPaymentResult>;
        presentPaymentSheet: (
            options?: PaymentSheet.PresentOptions,
        ) => Promise<PresentPaymentSheetResult>;
        initPaymentSheet: (
            params: PaymentSheet.SetupParams,
        ) => Promise<InitPaymentSheetResult>;
        createToken: (params: Token.CreateParams) => Promise<CreateTokenResult>;
        collectBankAccountForPayment: (
            clientSecret: string,
            params: PaymentMethod.CollectBankAccountParams,
        ) => Promise<CollectBankAccountForPaymentResult>;
        collectBankAccountForSetup: (
            clientSecret: string,
            params: PaymentMethod.CollectBankAccountParams,
        ) => Promise<CollectBankAccountForSetupResult>;
        verifyMicrodepositsForPayment: (
            clientSecret: string,
            params: VerifyMicrodepositsParams,
        ) => Promise<VerifyMicrodepositsForPaymentResult>;
        verifyMicrodepositsForSetup: (
            clientSecret: string,
            params: VerifyMicrodepositsParams,
        ) => Promise<VerifyMicrodepositsForSetupResult>;
        canAddCardToWallet: (
            params: CanAddCardToWalletParams,
        ) => Promise<CanAddCardToWalletResult>;
        collectBankAccountToken: (
            clientSecret: string,
            params?: CollectBankAccountTokenParams,
        ) => Promise<FinancialConnections.TokenResult>;
        collectFinancialConnectionsAccounts: (
            clientSecret: string,
            params?: CollectFinancialConnectionsAccountsParams,
        ) => Promise<SessionResult>;
        resetPaymentSheetCustomer: () => Promise<null>;
        isPlatformPaySupported: (
            params?: { googlePay?: IsGooglePaySupportedParams },
        ) => Promise<boolean>;
        confirmPlatformPaySetupIntent: (
            clientSecret: string,
            params: PlatformPay.ConfirmParams,
        ) => Promise<PlatformPay.ConfirmSetupIntentResult>;
        confirmPlatformPayPayment: (
            clientSecret: string,
            params: PlatformPay.ConfirmParams,
        ) => Promise<PlatformPay.ConfirmPaymentResult>;
        dismissPlatformPay: () => Promise<boolean>;
        createPlatformPayPaymentMethod: (
            params: PaymentMethodParams,
        ) => Promise<PaymentMethodResult>;
        createPlatformPayToken: (
            params: PaymentMethodParams,
        ) => Promise<PlatformPay.TokenResult>;
        updatePlatformPaySheet: (
            params: {
                applePay: {
                    cartItems: PlatformPay.CartSummaryItem[];
                    shippingMethods: ShippingMethod[];
                    errors: ApplePaySheetError[];
                };
            },
        ) => Promise<{ error?: StripeError<PlatformPayError> }>;
        openPlatformPaySetup: () => Promise<void>;
    }

    • retrievePaymentIntent: (clientSecret: string) => Promise<RetrievePaymentIntentResult>
    • retrieveSetupIntent: (clientSecret: string) => Promise<RetrieveSetupIntentResult>
    • confirmPayment: (
          paymentIntentClientSecret: string,
          data?: PaymentIntent.ConfirmParams,
          options?: CreateOptions,
      ) => Promise<ConfirmPaymentResult>
    • createPaymentMethod: (
          data: PaymentMethod.CreateParams,
          options?: CreateOptions,
      ) => Promise<CreatePaymentMethodResult>
    • handleNextAction: (
          paymentIntentClientSecret: string,
          returnURL?: string,
      ) => Promise<HandleNextActionResult>
    • handleNextActionForSetup: (
          setupIntentClientSecret: string,
          returnURL?: string,
      ) => Promise<HandleNextActionForSetupResult>
    • confirmSetupIntent: (
          paymentIntentClientSecret: string,
          data: PaymentIntent.ConfirmParams,
          options?: CreateOptions,
      ) => Promise<ConfirmSetupIntentResult>
    • createTokenForCVCUpdate: (cvc: string) => Promise<CreateTokenForCVCUpdateResult>
    • handleURLCallback: (url: string) => Promise<boolean>
    • confirmPaymentSheetPayment: () => Promise<ConfirmPaymentSheetPaymentResult>
    • presentPaymentSheet: (options?: PaymentSheet.PresentOptions) => Promise<PresentPaymentSheetResult>
    • initPaymentSheet: (params: PaymentSheet.SetupParams) => Promise<InitPaymentSheetResult>
    • createToken: (params: Token.CreateParams) => Promise<CreateTokenResult>
    • collectBankAccountForPayment: (
          clientSecret: string,
          params: PaymentMethod.CollectBankAccountParams,
      ) => Promise<CollectBankAccountForPaymentResult>
    • collectBankAccountForSetup: (
          clientSecret: string,
          params: PaymentMethod.CollectBankAccountParams,
      ) => Promise<CollectBankAccountForSetupResult>
    • verifyMicrodepositsForPayment: (
          clientSecret: string,
          params: VerifyMicrodepositsParams,
      ) => Promise<VerifyMicrodepositsForPaymentResult>
    • verifyMicrodepositsForSetup: (
          clientSecret: string,
          params: VerifyMicrodepositsParams,
      ) => Promise<VerifyMicrodepositsForSetupResult>
    • canAddCardToWallet: (params: CanAddCardToWalletParams) => Promise<CanAddCardToWalletResult>
    • collectBankAccountToken: (
          clientSecret: string,
          params?: CollectBankAccountTokenParams,
      ) => Promise<FinancialConnections.TokenResult>
    • collectFinancialConnectionsAccounts: (
          clientSecret: string,
          params?: CollectFinancialConnectionsAccountsParams,
      ) => Promise<SessionResult>
    • resetPaymentSheetCustomer: () => Promise<null>

      You must call this method when the user logs out from your app. This will ensure that any persisted authentication state in the PaymentSheet, such as authentication cookies, is also cleared during logout.

    • isPlatformPaySupported: (params?: { googlePay?: IsGooglePaySupportedParams }) => Promise<boolean>
    • confirmPlatformPaySetupIntent: (
          clientSecret: string,
          params: PlatformPay.ConfirmParams,
      ) => Promise<PlatformPay.ConfirmSetupIntentResult>
    • confirmPlatformPayPayment: (
          clientSecret: string,
          params: PlatformPay.ConfirmParams,
      ) => Promise<PlatformPay.ConfirmPaymentResult>
    • dismissPlatformPay: () => Promise<boolean>
    • createPlatformPayPaymentMethod: (params: PaymentMethodParams) => Promise<PaymentMethodResult>
    • createPlatformPayToken: (params: PaymentMethodParams) => Promise<PlatformPay.TokenResult>
    • updatePlatformPaySheet: (
          params: {
              applePay: {
                  cartItems: PlatformPay.CartSummaryItem[];
                  shippingMethods: ShippingMethod[];
                  errors: ApplePaySheetError[];
              };
          },
      ) => Promise<{ error?: StripeError<PlatformPayError> }>
    • openPlatformPaySetup: () => Promise<void>
    • Defined in src/hooks/useStripe.tsx:69

Settings

Member Visibility
@stripe/stripe-react-native
  • Loading...

Generated using TypeDoc