1.2.0 • Published 4 days ago

@bennyapi/react-native-sdk v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

Benny React Native SDK

The Benny React Native SDK allows your React Native app to use Benny client libraries.

Note See our complete documentation at docs.bennyapi.com.

Installation

Install the SDK using your preferred package manager.

yarn install @bennyapi/react-native-sdk

Usage

EBT Balance Link Flow

The Ebt Balance Link Flow allows users to link their EBT account, verifying the account, and returning a tokenized representation of the credentials for fetching balance and transaction information.

Required IDs

You'll need an organizationId, the ID representing your organization, along with a temporarylink that is generated serverside via a call to the Benny API.

Note Reach out to help@bennyapi.com to set up your organization.

Integration

The Ebt Balance Link Flow is contained in a simple fullscreen component, EbtBalanceLinkFlow, that is initialized with your organization ID and the single-use temporary link.

Callbacks (i.e., onExit and onLinkResult) are responsible for communicating to your app when the user wants to exit the flow and when a link result is obtained.

<EbtBalanceLinkFlow
  organizationId="org_wup29bz683g8habsxvazvyz1"
  temporaryLink="temp_clr0vujq9000108l66odc7fxv"
  onExit={() => {
    /** Your on exit logic. */
  }}
  onLinkResult={
    /** Your on link result logic. */
  }
  environment={EbtBalanceLinkFlowEnvironment.Sandbox}
/>

Environments

Set the environment to EbtBalanceLinkFlowEnvironment.Sandbox to integrate with the Benny sandbox environment, or omit to default to the production environment.

Handling Browser Navigation

On Android's hardware back press or gesture, the flow will go back if there are previous screens.

Example App

The Expo example app can be run with:

yarn example android

or

yarn example ios

Author

Benny API Inc.

License

The Benny SDK is available under the MIT license.