react-mono-js

This is a react package for implementing mono enrollment gateway


Keywords
javaScript, typeScript, github, react, open source, payments, mono, collections, collection, enrollment, fintech, gateway
License
MIT
Install
npm install react-mono-js@1.1.2

Documentation

Mono for React

This is a React Package that helps you integrate Mono - https://withmono.com/ easily

Install

npm install --save react-mono-js
# or
yarn add react-mono-js

Usage

import React from 'react';
import { MonoButton, useMono } from 'react-mono-js';

export default function App() {
  const config = {
    public_key: 'YOUR_CONNECT_PUBLIC_KEY',
    onClose: () => {},
    onSuccess: (response) => {
      console.log(response.code);

      /**
        response : { "code": "code_xyz" }
        you can send this code back to your server to get this
        authenticated account and start making requests.
      */
    },
  };

  const handleMono = useMono({ public_key: 'YOUR_CONNECT_PUBLIC_KEY' });

  return (
    <div className="App">
      <h1>React Wrapper for Mono enrollments</h1>
      <h2>Check it out!</h2>

      <button
        onClick={() =>
          handleMono({
            onClose: () => null,
            onSuccess: (response) => {
              console.log(response.code);
            },
          })
        }
      >
        Connect bank with Mono
      </button>

      <MonoButton {...config} text="Connect bank with Mono!" />
    </div>
  );
}

Please checkout Mono Documentation for more explanation

Follow on Twitter @somtougeh

License

This project is licensed under the MIT License - see the LICENSE.md file for details