capacitor-stripe-terminal
    Preparing search index...

    Class StripeTerminalPlugin

    Index
    isInitialized: boolean = false
    • This should not be used directly. It will not behave correctly when using Internet and Both discovery methods

      Parameters

      • eventName: string
      • listenerFunc: Function

      Returns Promise<PluginListenerHandle>

      This should not be used directly. It will not behave correctly when using Internet and Both discovery methods

    • Cancel auto-reconnection

      Returns Promise<void>

    • Cancels an in-progress collectInputs.

      Returns Promise<void>

    • Returns Promise<void>

    • Cancels an in-progress collectRefundPaymentMethod.

      Returns Promise<void>

    • Cancels an in-progress collectSetupIntentPaymentMethod.

      Returns Promise<void>

    • Returns Promise<void>

    • Returns Promise<void>

    • Returns Promise<void>

    • Confirms the refund for the payment method collected by collectRefundPaymentMethod.

      Returns Promise<Refund | null>

    • Creates a new PaymentIntent on the device.

      This requires a connected reader and is only available for readers that support creating payment intents on device. Most integrations should create the PaymentIntent on their backend and use retrievePaymentIntent instead.

      Parameters

      Returns Promise<PaymentIntent | null>

    • Removes all event listeners and resets the plugin instance to an uninitialized state. Call this when the plugin is no longer needed (e.g. on component unmount) to prevent listener leaks.

      Returns Promise<void>

    • The SDK was not able to reconnect to the previously connected bluetooth reader. The SDK is now disconnected from any readers.

      In your implementation of this method, you should notify your user that the reader has disconnected.

      Requires autoReconnectOnUnexpectedDisconnect is set to true in the BluetoothConnectionConfiguration

      Parameters

      • callback: () => void

      Returns Promise<PluginListenerHandle>

    • Parameters

      Returns Promise<PluginListenerHandle>

    • Parameters

      • callback: (progress: number) => void

      Returns Promise<PluginListenerHandle>

    • The reader has lost Bluetooth connection to the SDK and reconnection attempts have been started.

      In your implementation of this method, you should notify your user that the reader disconnected and that reconnection attempts are being made.

      Requires autoReconnectOnUnexpectedDisconnect is set to true in the BluetoothConnectionConfiguration

      Parameters

      • callback: () => void

      Returns Promise<PluginListenerHandle>

    • The SDK was able to reconnect to the previously connected Bluetooth reader.

      In your implementation of this method, you should notify your user that reader connection has been re-established.

      Requires autoReconnectOnUnexpectedDisconnect is set to true in the BluetoothConnectionConfiguration

      Parameters

      • callback: () => void

      Returns Promise<PluginListenerHandle>

    • Subscribe to battery updates reported by the connected reader.

      Bluetooth and Tap to Pay readers only.

      Parameters

      Returns Promise<PluginListenerHandle>

    • Returns Promise<void>

    • Parameters

      Returns Promise<PluginListenerHandle>

    • Returns Promise<void>

    • Reboots the connected reader.

      The reader will disconnect while it restarts.

      Returns Promise<void>

    • Retrieves a SetupIntent created on your backend and makes it the active setup intent.

      Parameters

      • clientSecret: string

      Returns Promise<SetupIntent | null>

    • Returns whether the current mobile device supports the given reader type using the given discovery method.

      Parameters

      • deviceType: DeviceType

        The type of reader to check support for.

      • discoveryMethod: DiscoveryMethod

        The discovery method to check support for.

      • simulated: boolean = false

        Whether to check for simulated reader support.

      Returns Promise<boolean>

    • Creates an instance of [[StripeTerminalPlugin]] with the given options.

      const terminal = await StripeTerminalPlugin.create({
      fetchConnectionToken: async () => {
      const resp = await fetch('https://your-backend.dev/token', {
      method: 'POST'
      })
      const data = await resp.json()

      return data.secret
      },
      onUnexpectedReaderDisconnect: () => {
      // handle reader disconnect
      }
      })

      Parameters

      Returns Promise<StripeTerminalPlugin>