@azizuysal/wallet-kit API Documentation - v2.0.0
    Preparing search index...

    Variable WalletKitModuleConst

    WalletKitModule: {
        canAddPasses(): Promise<boolean>;
        addPass(passData: string): Promise<boolean>;
        addPasses(passDataArray: string[]): Promise<boolean>;
    } = ...

    WalletKit public API. All methods validate input at the JS layer before delegating to the native module, so invalid calls fail fast with a stable error shape on every platform.

    Type Declaration

    • canAddPasses: function
      • Check if the device can add passes to the wallet.

        Returns Promise<boolean>

        true if the platform wallet supports adding passes, false otherwise. On iOS, hiding Wallet with Screen Time does not disable PassKit and can still return true. Rejects if the availability check itself fails, such as a Google Play Services error on Android.

    • addPass: function
      • Add a single pass to the wallet.

        Parameters

        • passData: string

          Base64-encoded .pkpass on iOS, JWT on Android.

        Returns Promise<boolean>

        A promise that resolves with the native wallet outcome. On iOS, true means the pass was newly added and false means the user cancelled or the pass was already present. On Android, true means Google Wallet reported a successful save, including an already-linked object, and false means cancellation. Rejects with a WalletError on any error.

        WalletError with code INVALID_PASS if passData is empty or not a recognized format.

        WalletError with code ERR_WALLET_IN_PROGRESS if a previous add-pass call is still awaiting a result.

        The same outcome is also delivered via the AddPassCompleted event on createWalletEventEmitter. The event is retained as a secondary compatibility channel; the Promise return value is the primary API in 2.x.

    • addPasses: function
      • Add one or more passes to the wallet.

        Parameters

        • passDataArray: string[]

          Non-empty array of pass data strings (base64 for iOS, JWT for Android).

        Returns Promise<boolean>

        A promise that resolves with the native wallet outcome. On iOS, true means every pass was newly added and false means the user cancelled or a pass was already present. On Android, true means Google Wallet reported a successful save, including an already-linked object, and false means cancellation. Rejects with a WalletError on any error.

        WalletError with code INVALID_PASS if the array is empty or contains an entry that is not a recognized format.

        WalletError with code ERR_WALLET_MULTIPLE_NOT_SUPPORTED on Android when the array contains more than one entry. The Google Wallet API only accepts a single JWT per call; combine multiple passes into one JWT on your server.

        WalletError with code ERR_WALLET_IN_PROGRESS if a previous add-pass call is still awaiting a result.

        The same outcome is also delivered via the AddPassCompleted event on createWalletEventEmitter. The event is retained as a secondary compatibility channel; the Promise return value is the primary API in 2.x.