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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-squadco-webview

v1.0.0

Published

A lightweight React Native SDK for integrating [Squad](https://squadco.com) payments into your mobile app.

Readme

React Native Squad WebView

A lightweight React Native SDK for integrating Squad payments into your mobile app.

npm version license

Features

  • Simple WebView-based checkout integration
  • Full TypeScript support
  • Works with Expo and bare React Native projects
  • Supports multiple payment channels (Card, Bank Transfer, USSD)
  • Customizable callbacks for payment events
  • No native code modifications required

App Preview

Installation

npm install react-native-squadco-webview react-native-webview

For Expo projects:

npx expo install react-native-squadco-webview react-native-webview

Quick Start

import React from 'react';
import { View, StyleSheet } from 'react-native';
import { SquadWebView } from 'react-native-squadco-webview';

export default function PaymentScreen() {
  return (
    <View style={styles.container}>
      <SquadWebView
        publicKey="sandbox_pk_xxxxxxxxxxxxxxxx"
        email="[email protected]"
        amount={50000} // Amount in kobo (500 NGN)
        transactionRef={`ref_${Date.now()}`}
        currencyCode="NGN"
        customerName="John Doe"
        onSuccess={(data) => {
          console.log('Payment successful:', data);
          // Handle successful payment
        }}
        onClose={() => {
          console.log('Payment modal closed');
          // Handle modal close
        }}
        onLoad={() => {
          console.log('Payment widget loaded');
        }}
        onError={(error) => {
          console.error('Payment error:', error);
          // Handle payment error
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | publicKey | string | Yes | - | Your Squad public key from the dashboard | | email | string | Yes | - | Customer's email address | | amount | number | Yes | - | Amount in kobo/cents (e.g., 50000 = 500 NGN) | | transactionRef | string | Yes | - | Unique transaction reference | | currencyCode | 'NGN' \| 'USD' | Yes | - | Payment currency | | paymentChannels | array | No | ['card', 'bank', 'ussd', 'transfer'] | Available payment methods | | customerName | string | No | - | Customer's full name | | callbackUrl | string | No | - | URL to redirect after payment | | metadata | object | No | - | Additional data to attach to transaction | | passCharge | boolean | No | false | Pass transaction charges to customer | | onSuccess | function | No | - | Callback when payment is successful | | onClose | function | No | - | Callback when payment modal is closed | | onLoad | function | No | - | Callback when payment widget loads | | onError | function | No | - | Callback when an error occurs |

Payment Channels

You can specify which payment methods to display:

<SquadWebView
  // ... other props
  paymentChannels={['card', 'bank']} // Only show card and bank transfer
/>

Available channels:

  • card - Debit/Credit card payments
  • bank - Bank transfer
  • ussd - USSD payments
  • transfer - Direct transfer

Handling Responses

Success Response

onSuccess={(data) => {
  // data contains transaction details
  console.log(data);
  // Navigate to success screen or verify transaction on your backend
}}

Error Handling

onError={(error) => {
  // Handle WebView errors
  console.error('Payment failed:', error);
}}

Getting Your API Keys

  1. Sign up at squadco.com
  2. Navigate to your dashboard
  3. Copy your Public Key (use sandbox key for testing)

Testing

Use Squad's test credentials in sandbox mode. Refer to Squad's documentation for test card numbers and bank details.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT License - see the LICENSE file for details.

Support


Made with care for the React Native community.