@chuttapp/in-app-react
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

@chuttapp/in-app-react

This package has everything you need to develop a ChuttApp In-App service.

Install

With npm

npm install @chuttapp/in-app-react

With yarn

yarn add @chuttapp/in-app-react

Usage

For Nodejs environments.

React, Angular etc.

import { InAppService, Button, ... } from '@chuttapp/in-app-react'

Browser environment.

<script src="@chuttapp/in-app-react/dist/esm/index.browser" type="module">
</script>

...or inlcude bundle

<script src="https://unpkg.com/@chuttapp/in-app-react@{{PKG_VERSION}}/dist/esm/index.browser.js"></script>

Usage example

Accepting payments

import { onPay } from '@chuttapp/in-app-react'

const onPayClick = () => {
  const payload = {
    amount: 3.5, // REQUIRED
    currency: 'GHS', // REQUIRED
    data: {
      // ...pass stuff here (OPTIONAL)
    }
  }
  onPay(payload)
}

Open Scanner

import { onOpenScanner } from '@chuttapp/in-app-react'

const openScanner = () => {
  onOpenScanner()
}

Read the documentation

ChuttApp Docs

Dependencies (9)

Dev Dependencies (21)

Package Sidebar

Install

npm i @chuttapp/in-app-react

Weekly Downloads

6

Version

1.4.0

License

MIT

Unpacked Size

4.62 MB

Total Files

112

Last publish

Collaborators

  • owusuapp