npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fluidcoins/react-native-fluidcoins-pay

v0.0.9

Published

Connect your React native app with FluidcoinsPay

Downloads

11

Readme

Fluidcoins Pay React Native SDK

Fluidcoins Pay.js is quick and secure way to receive crypto payments in your application. It works with all Javascript frameworks

Documentation

Getting Started

1: Register a merchant account on Fluidcoins and get your public API key

Installation

You can install the package via NPM or Yarn;

npm i @fluidcoins/react-native-fluidcoins-pay

OR

yarn add @fluidcoins/react-native-fluidcoins-pay

Also install react-native-webview because it's a peer dependency for this package.

Usage

Hooks

import * as React from 'react';

import { StyleSheet, View, TouchableOpacity, Text, TextInput,} from 'react-native';
import { FluidcoinsProvider, useFluidcoinsPay } from 'react-native-fluidcoins-pay';

export default function App() {
  const [value, setValue] = React.useState('0');

  const config = {
    publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
    email: '[email protected]',
    onSuccess: () => {},
    amount: parseInt(value, 10) * 100,
  };

  const Button = () => {
    const { open } = useFluidcoinsPay();

    return (
      <View style={styles.button}>
        <TouchableOpacity onPress={open}>
          <Text style={styles.text}>Pay {value}</Text>
        </TouchableOpacity>
      </View>
    );
  };
  return (
    <View style={styles.container}>
      <FluidcoinsProvider {...config}>
        <TextInput
          style={styles.input}
          value={value}
          onChangeText={(v) => setValue(v)}
        />
        <Button />
      </FluidcoinsProvider>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    padding: 64,
  },
  box: {
    width: 60,
    height: 60,
    marginVertical: 20,
  },
  button: {
    backgroundColor: 'blue',
    paddingHorizontal: 16,
    paddingVertical: 16,
    borderRadius: 4,
    width: '100%',
  },
  text: {
    color: '#fff',
    fontSize: 18,
    textAlign: 'center',
  },
  input: {
    borderColor: 'green',
    borderWidth: 1,
    borderRadius: 2,
    marginBottom: 8,
    padding: 10,
    width: '100%',
  },
});

Configurations Options

  • publicKey
  • amount
  • email
  • onSuccess
  • onLoad (optional)
  • onClose (optional)
  • name (optional)
  • phone (optional)
  • metadata (optional)

publicKey

REQUIRED

This is your Fluidcoins public API key from the Fluidcoins dashboard.

amount

REQUIRED

This is amount in KOBO you'd want to collect from the customer.

NOTE: The miumum amount is 500 NGN

const config = {
    publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
    amount: parseInt(value, 10) * 100,
  };

email

REQUIRED

This is the email address of the customer

const config = {
    publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
    amount: parseInt(value, 10) * 100,
    email: '[email protected]',
  };

onSuccess

REQUIRED

This is function that will be called when a successful transaction occurs.

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  }
};

A JSON payload is passed as argument with the structure below;

{
    reference: TRANS_REFERENCE,
    coin: 'BTC',
    human_readable_amount: 1000,
    payment_status: 'underpaid | overpaid | paid_in_full'
}

Payment status could be overpaid, underpaid or paid_in_full

onClose

OPTIONAL

This optional closure is called when a user closes the Fluidcoins Widget. It takes no argument

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
};

name

OPTIONAL

This optional parameter; which is the name of customer who want to initiate the transaction. It reflects on the Fluidcoins dashboard.

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
  name: 'Seun Akanni'
};

phone

OPTIONAL

This optional parameter; which is the phone number of customer who want to initiate the transaction. It reflects on the Fluidcoins dashboard.

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
  name: 'Seun Akanni',
  phone: '+2348090909090',
};

reference

OPTIONAL

This optional parameter; which is used to identify the initiated transaction.

NOTE : It must be unique per transaction

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
  name: 'Seun Akanni',
  phone: '+2348090909090',
  reference: 'random-unique-identifier'
};

metadata

OPTIONAL

This optional parameter, which is should contain data you will like to be passed via webhooks about the transaction. NOTE: The metadata must be an OBJECT

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
  name: 'Seun Akanni',
  phone: '+2348090909090',
  reference: 'random-unique-identifier'
  metadata: {
      key: 1
  }
};

currency

OPTIONAL

Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar"

NOTE: It defaults to default currency set on your Fluidcoins dashboard.

const config = {
  publicKey: 'YOUR_FLUIDCOINS_PUBLIC_KEY',
  amount: parseInt(value, 10) * 100,
  email: '[email protected]',
  onSuccess: (data) => {
    console.log(data)
  },
  onClose: () => {},
  name: 'Seun Akanni',
  phone: '+2348090909090',
  reference: 'random-unique-identifier'
  metadata: {
      key: 1
  },
  currency: 'USD'
};