open-index/open-npm huggingface dataset:
npm package: @kwentapay/api-client
Description: Kwenta API Client
Author: Kwenta
Latest version: 0.2.1

# @kwentapay/api-client

NPM package to interact with the [Kwenta](https://kwentapay.io) API.

## Installation

| Package manager | Command                              |
| --------------- | ------------------------------------ |
| NPM             | `npm install @kwentapay/api-client`  |
| Yarn            | `yarn add @kwentapay/api-client`     |
| PNPM            | `pnpm install @kwentapay/api-client` |

## Usage

Initialize the API client with:

```typescript
import { createApiClient } from "@kwentapay/api-client";

const kwenta = createApiClient({
  // URL of the Kwentapay API to interact with.
  url: "https://api.kwenta.st",
  // API key to authenticate with the Kwentapay API.
  token: "YOUR_API_KEY",
});
```

Then you can use the `kwenta` object to interact with the Kwentapay API.

See the [API documentation](https://docs.kwentapay.io) for more information.

## See also

- [Documentation](https://docs.kwentapay.io)
- [Client libraries](https://docs.kwentapay.io/integration/clients/)

## License

This project is licensed under the [MIT License](LICENSE).
npm package: @kwentapay/web-client
Description: Include Kwenta payments directly in your web app
Author: Kwenta
Latest version: 0.1.0

# @kwentapay/web-client

A TypeScript / JavaScript library to integrate the [Kwenta](https://kwentapay.io) GUI directly into your web application.

## Installation

| Package manager | Command                              |
| --------------- | ------------------------------------ |
| NPM             | `npm install @kwentapay/web-client`  |
| Yarn            | `yarn add @kwentapay/web-client`     |
| PNPM            | `pnpm install @kwentapay/web-client` |

## Example

In your HTML file, add an element with an ID to mount the Kwenta iframe into:

```html
<div id="kwenta-iframe" />
```

Then, with JavaScript, initialize the Kwenta client and load a transaction URL:

```js
import Kwenta from "@kwentapay/web-client";

const kwenta = new Kwenta.WebClient({
  parentId: "kwenta-iframe",
  onPayerPrepaid: () => alert("Current payer has prepaid successfully"),
  onPayersInvited: () => alert("Current payer has invited the other payers"),
});

kwenta.load("https://api.kwenta.st/o/4e83556f-a105-496e-8457-cea37d5bc173");
```

Whenever you need to unload the Kwenta iframe, you can call the `dispose` method:

```ts
kwenta.dispose();
```

## See also

- [Documentation](https://docs.kwentapay.io)
- [Client libraries](https://docs.kwentapay.io/integration/clients/)

## License

This project is licensed under the [MIT License](LICENSE).
npm package: @kwentapay/web-client-react
Description: Include Kwenta payments in your React web app
Author: Kwenta
Latest version: 0.1.0

# @kwentapay/web-client-react

A React component library to integrate the [Kwenta](https://kwentapay.io) GUI directly into your web application.

## Installation

| Package manager | Command                                    |
| --------------- | ------------------------------------------ |
| NPM             | `npm install @kwentapay/web-client-react`  |
| Yarn            | `yarn add @kwentapay/web-client-react`     |
| PNPM            | `pnpm install @kwentapay/web-client-react` |

## Example

```jsx
import { Kwenta } from "@kwentapay/web-client-react";

const transactionUrl =
  "https://api.kwenta.st/o/4e83556f-a105-496e-8457-cea37d5bc173";

const App = () => (
  <Kwenta
    url={transactionUrl}
    onPayerPrepaid={() => alert("Current payer has prepaid successfully")}
    onPayersInvited={() => alert("Current payer has invited the other payers")}
  />
);

export default App;
```

## See also

- [Documentation](https://docs.kwentapay.io)
- [Client libraries](https://docs.kwentapay.io/integration/clients/)

## License

This project is licensed under the [MIT License](LICENSE).