Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • StripeTerminalPlugin

Index

Properties

_fetchConnectionToken: (() => Promise<string>) = ...

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

_onUnexpectedReaderDisconnect: (() => void) = ...

Type declaration

    • (): void
    • Returns void

isCollectingPaymentMethod: boolean = false
isDiscovering: boolean = false
isInitialized: boolean = false
listeners: {} = {}

Type declaration

  • [key: string]: PluginListenerHandle
selectedSdkType: "native" | "js" = 'native'
simulatedCardType: SimulatedCardType
stripeTerminalWeb?: StripeTerminalWeb

Accessors

  • get activeSdkType(): "native" | "js"
  • get sdk(): StripeTerminalInterface

Methods

  • _listenerToObservable(name: "didReportReaderSoftwareUpdateProgress" | "didRequestReaderDisplayMessage" | "didRequestReaderInput" | "didReportAvailableUpdate" | "didStartInstallingUpdate" | "didFinishInstallingUpdate", transformFunc?: ((data: any) => any)): Observable<any>
  • Parameters

    • name: "didReportReaderSoftwareUpdateProgress" | "didRequestReaderDisplayMessage" | "didRequestReaderInput" | "didReportAvailableUpdate" | "didStartInstallingUpdate" | "didFinishInstallingUpdate"
    • Optional transformFunc: ((data: any) => any)
        • (data: any): any
        • Parameters

          • data: any

          Returns any

    Returns Observable<any>

  • addListener(eventName: string, listenerFunc: Function): Promise<PluginListenerHandle>
  • This should not be used directly. It will not behave correctly when using Internet and Both discovery methods

    deprecated

    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>

  • cancelCollectPaymentMethod(): Promise<void>
  • cancelDiscoverReaders(): Promise<void>
  • cancelInstallUpdate(): Promise<void>
  • clearCachedCredentials(): Promise<void>
  • clearReaderDisplay(): Promise<void>
  • This is only here for backwards compatibility

    deprecated

    Parameters

    Returns Promise<Reader>

    Reader

  • didReportReaderSoftwareUpdateProgress(): Observable<number>
  • disconnectReader(): Promise<void>
  • ensureInitialized(): void
  • getConnectedReader(): Promise<Reader>
  • init(): Promise<void>
  • installAvailableUpdate(): Promise<void>
  • isNative(): boolean
  • objectExists<T>(object: T): T
  • Ensure that an object exists and is not empty

    Type Parameters

    • T

    Parameters

    • object: T

      Object to check

    Returns T

  • requestConnectionToken(sdkType: string): void
  • Parameters

    • sdkType: string

    Returns void

  • retrievePaymentIntent(clientSecret: string): Promise<PaymentIntent>
  • setReaderDisplay(cart: Cart): Promise<void>
  • translateAndroidReaderInput(data: { isAndroid?: boolean; value: string }): ReaderInputOptions
  • 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>

Generated using TypeDoc