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

droplinked-payment-intent

v1.5.0

Published

A unified React payment component library that supports multiple payment providers (Stripe and Paymob) with customizable styling.

Readme

Droplinked Payment Intent

A unified React payment component library that supports multiple payment providers (Stripe and Paymob) with customizable styling.

npm version License: MIT

Features

  • 🔄 Unified API for multiple payment providers
  • 💳 Support for Stripe and Paymob payment gateways
  • 🎨 Highly customizable UI with comprehensive styling options
  • 🌐 Support for both testnet and production environments
  • 📱 Responsive design for all device sizes
  • 🔒 Secure payment processing

Installation

# Using npm
npm install droplinked-payment-intent

# Using yarn
yarn add droplinked-payment-intent

# Using pnpm
pnpm add droplinked-payment-intent

Quick Start

import React from 'react';
import { DroplinkedPaymentIntent } from 'droplinked-payment-intent';

function PaymentPage() {
  return (
    <div className="payment-container">
      <h2>Complete Your Payment</h2>
      <DroplinkedPaymentIntent
        clientSecret="your_client_secret"
        type="stripe" // or "paymob"
        return_url="https://your-return-url.com"
        onSuccess={() => console.log('Payment successful')}
        onError={(error) => console.error('Payment failed', error)}
        isTestnet={true} // Set to false for production
      />
    </div>
  );
}

export default PaymentPage;

API Reference

DroplinkedPaymentIntent Component

The main component that renders a payment form based on the specified provider.

Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | clientSecret | string | Yes | - | Secret key for payment authentication | | type | 'stripe' | 'paymob' | Yes | - | Payment provider type | | return_url | string | No | window.location.href | URL to redirect after payment completion | | commonStyle | CommonStyle | No | defaultCommonStyle | Styling options for the payment component | | onSuccess | () => void | No | - | Callback function on successful payment | | onError | (error: unknown) => void | No | - | Callback function on payment error | | isTestnet | boolean | No | false | Indicates whether the payment is in testnet mode |

Styling Options

The component accepts a commonStyle prop that allows for comprehensive customization of the payment form.

// Example of custom styling
const customStyle = {
  fontFamily: 'Roboto, sans-serif',
  fontSizeLabel: '14px',
  fontSizeInput: '16px',
  fontSizePaymentButton: '16px',
  fontWeightLabel: 500,
  fontWeightInput: 400,
  fontWeightPaymentButton: 600,
  colorContainer: '#FFFFFF',
  colorBorderInput: '#E5E7EB',
  colorBorderPaymentButton: 'transparent',
  borderRadius: '8px',
  colorDisabled: '#9CA3AF',
  colorError: '#EF4444',
  colorPrimary: '#4F46E5',
  colorInput: '#FFFFFF',
  textColorLabel: '#374151',
  textColorPaymentButton: '#FFFFFF',
  textColorInput: '#1F2937',
  placeholderColor: '#9CA3AF',
  containerWidth: '100%',
  verticalPadding: '12px',
  verticalSpacing: '16px',
  containerPadding: '16px',
  backgroundBody: '#F9FAFB',
  textColorParagraphs: '#4B5563',
  theme: 'light', // 'light' or 'dark'
  submitButton: {
    backgroundColor: '#4F46E5',
    textColor: '#FFFFFF',
    fontSize: '14px',
    fontWeight: 500,
    borderRadius: '4px'
  },
  cancelButton: {
    backgroundColor: '#F3F4F6',
    textColor: '#4B5563',
    fontSize: '14px',
    fontWeight: 500,
    borderRadius: '4px'
  }
};

Payment Providers

Stripe

For Stripe payments, the component uses Stripe Elements to render a secure payment form. You need to obtain a client secret from your backend.

<DroplinkedPaymentIntent
  clientSecret="your_stripe_client_secret"
  type="stripe"
  return_url="https://your-return-url.com"
  isTestnet={true}
/>

Paymob

For Paymob payments, the component integrates with Paymob Pixel SDK to handle payment processing.

<DroplinkedPaymentIntent
  clientSecret="your_paymob_client_secret"
  type="paymob"
  commonStyle={commonStyle}
  return_url="https://droplinked.com/"
  onSuccess={() => console.log('Payment successful')}
  onError={(error) => console.error('Payment failed: ', error)}    
  isTestnet={true}
/>

Browser Support

The library supports all modern browsers:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

License

MIT © Droplinked