# capacitor-poolakey

> A bridge for CafeBazaar (Android App Store) in-app-billing SDK (Poolakey) in CapacitorJs

Latest version **8.0.0** (published 2025-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install capacitor-poolakey
pnpm add capacitor-poolakey
yarn add capacitor-poolakey
bun add capacitor-poolakey
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.0.0 |
| Published | 2025-12-16 |
| First published | 2023-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 69.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mohammad Hossein Zendehpey |
| Maintainers | mhzendehpey |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/capacitor-poolakey
- Repository: https://github.com/mhzendehpey/capacitor-poolakey
- Homepage: https://github.com/mhzendehpey/capacitor-poolakey#readme
- Issues: https://github.com/mhzendehpey/capacitor-poolakey/issues
- npm.io page: https://npm.io/package/capacitor-poolakey

## Recent versions

- 8.0.0 (latest) — 2025-12-16
- 7.0.0 — 2025-03-29
- 6.0.0 — 2024-09-23
- 0.2.0 — 2023-06-01
- 0.1.10 — 2023-05-04
- 0.1.9 — 2023-05-04
- 0.1.8 — 2023-05-04
- 0.1.7 — 2023-05-04
- 0.1.6 — 2023-05-04
- 0.1.5 — 2023-05-04
- 0.1.4 — 2023-05-04
- 0.1.2 — 2023-05-04
- 0.1.1 — 2023-05-04
- 0.1.0 — 2023-05-04

## README

# capacitor-poolakey [![NPM Version](https://img.shields.io/npm/v/capacitor-poolakey)](https://www.npmjs.com/package/capacitor-poolakey)

A bridge for CafeBazaar (Android App Store) in-app-billing SDK (Poolakey) in CapacitorJs

## Install

```bash
npm install capacitor-poolakey
npx cap sync
```
or
```bash
yarn add capacitor-poolakey
npx cap sync
```

## Usage
```typescript
import {Poolakey} from "capacitor-poolakey";

class myClassComponent extends React.Component {
    
    getPurchasedProducts() {
        Poolakey.getPurchasedProducts().then((res) => {
            console.log("Poolakey: getPurchasedProducts succeed")
            console.log(res?.list)
        }).catch(err => {
            console.log(`Poolakey: getPurchasedProducts failed: ${err}`)
        })
    }

    componentDidMount() {
        Poolakey.connectPayment(rsaPublicKey).then(() => {
            console.log("Poolakey: connected")
            this.getPurchasedProducts()
        }).catch(err => {
            console.log(`Poolakey: failed to connect: ${err}`)
        })
    }

    componentWillUnmount() {
        Poolakey.disconnectPayment().then(() => {
            console.log("Poolakey: disconnected on unmount")
        }).catch(err => {
            console.log(`Poolakey: failed to disconnect on unmount: ${err}`)
        })
    }
}
```

## API

<docgen-index>

* [`connectPayment(...)`](#connectpayment)
* [`disconnectPayment()`](#disconnectpayment)
* [`purchaseProduct(...)`](#purchaseproduct)
* [`subscribeProduct(...)`](#subscribeproduct)
* [`consumeProduct(...)`](#consumeproduct)
* [`getPurchasedProducts()`](#getpurchasedproducts)
* [`getSubscribedProducts()`](#getsubscribedproducts)
* [`queryPurchaseProduct(...)`](#querypurchaseproduct)
* [`querySubscribeProduct(...)`](#querysubscribeproduct)
* [`getInAppSkuDetails(...)`](#getinappskudetails)
* [`getSubscriptionSkuDetails(...)`](#getsubscriptionskudetails)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### connectPayment(...)

```typescript
connectPayment(rsaPublicKey: string) => any
```

| Param              | Type                |
| ------------------ | ------------------- |
| **`rsaPublicKey`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### disconnectPayment()

```typescript
disconnectPayment() => any
```

**Returns:** <code>any</code>

--------------------


### purchaseProduct(...)

```typescript
purchaseProduct(productId: string, payload?: string | undefined, dynamicPriceToken?: string | undefined) => any
```

| Param                   | Type                |
| ----------------------- | ------------------- |
| **`productId`**         | <code>string</code> |
| **`payload`**           | <code>string</code> |
| **`dynamicPriceToken`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### subscribeProduct(...)

```typescript
subscribeProduct(productId: string, payload?: string | undefined, dynamicPriceToken?: string | undefined) => any
```

| Param                   | Type                |
| ----------------------- | ------------------- |
| **`productId`**         | <code>string</code> |
| **`payload`**           | <code>string</code> |
| **`dynamicPriceToken`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### consumeProduct(...)

```typescript
consumeProduct(purchaseToken: string) => any
```

| Param               | Type                |
| ------------------- | ------------------- |
| **`purchaseToken`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### getPurchasedProducts()

```typescript
getPurchasedProducts() => any
```

**Returns:** <code>any</code>

--------------------


### getSubscribedProducts()

```typescript
getSubscribedProducts() => any
```

**Returns:** <code>any</code>

--------------------


### queryPurchaseProduct(...)

```typescript
queryPurchaseProduct(productId: string) => any
```

| Param           | Type                |
| --------------- | ------------------- |
| **`productId`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### querySubscribeProduct(...)

```typescript
querySubscribeProduct(productId: string) => any
```

| Param           | Type                |
| --------------- | ------------------- |
| **`productId`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### getInAppSkuDetails(...)

```typescript
getInAppSkuDetails(productIdsJson: string) => any
```

| Param                | Type                |
| -------------------- | ------------------- |
| **`productIdsJson`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### getSubscriptionSkuDetails(...)

```typescript
getSubscriptionSkuDetails(productIdsJson: string) => any
```

| Param                | Type                |
| -------------------- | ------------------- |
| **`productIdsJson`** | <code>string</code> |

**Returns:** <code>any</code>

--------------------


### Interfaces


#### PurchaseInfo

| Prop                   | Type                |
| ---------------------- | ------------------- |
| **`orderId`**          | <code>string</code> |
| **`purchaseToken`**    | <code>string</code> |
| **`developerPayload`** | <code>string</code> |
| **`packageName`**      | <code>string</code> |
| **`purchaseState`**    | <code>number</code> |
| **`purchaseTime`**     | <code>number</code> |
| **`productId`**        | <code>string</code> |
| **`dataSignature`**    | <code>string</code> |


#### PurchaseInfoList

| Prop       | Type            |
| ---------- | --------------- |
| **`list`** | <code>{}</code> |


#### SkuDetails

| Prop              | Type                |
| ----------------- | ------------------- |
| **`sku`**         | <code>string</code> |
| **`title`**       | <code>string</code> |
| **`type`**        | <code>string</code> |
| **`price`**       | <code>string</code> |
| **`description`** | <code>string</code> |

</docgen-api>

---
_Source: https://npm.io/package/capacitor-poolakey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
