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-bill24-sdk

v1.0.0

Published

Unofficial Expo module for Bill24Sdk integration in React Native apps.

Readme

React Native Bill24 SDK

An unofficial Expo module for integrating Bill24 payment services into React Native applications. This library provides a seamless way to implement Bill24's instant payment and top-up functionality in your mobile apps.

Features

  • 🚀 Instant Payment: Quick payment processing with Bill24
  • 💰 Top-up Payments: Wallet top-up functionality
  • 🌍 Multi-language Support: English and Khmer language support
  • 🌙 Dark Mode: Built-in dark mode support
  • 🏗️ Environment Support: Production, staging, pilot, and demo environments
  • 📱 Cross-platform: Works on both iOS and Android
  • Expo Compatible: Built as an Expo module

Installation

npm install react-native-bill24-sdk

Additional Setup

Android

You can override the B24PaymentSdk version used by this library by adding to your android/gradle.properties:

b24paymentsdkVersion=1.2.0

iOS

No additional setup required for iOS.

Usage

Basic Import

import Bill24Sdk from 'react-native-bill24-sdk';
import { 
  Bill24InstantPaymentProps, 
  Bill24InstantPaymentTopUpProps 
} from 'react-native-bill24-sdk';

Instant Payment

Use this method to initiate a general instant payment:

const handleInstantPayment = async () => {
  try {
    const result = await Bill24Sdk.instantPaymentSdk({
      userSyncCode: "your-user-sync-code",
      refererKey: "your-referer-key", 
      language: "en", // "en" | "km"
      isDarkMode: false,
      isProduction: false, // Set to true for production
      testingEnv: "DEMO" // "STAG" | "PRODUCTION" | "PILOT" | "DEMO"
    });

    if (result.success) {
      console.log('Payment successful:', result.message);
    } else {
      console.log('Payment failed:', result.message);
    }
  } catch (error) {
    console.error('Payment error:', error);
  }
};

Top-up Payment

Use this method for wallet top-up payments:

const handleTopUpPayment = async () => {
  try {
    const result = await Bill24Sdk.instantPaymentSdkTopUp({
      paymentMethodId: "payment-method-id", // Bill24 wallet ID
      refererKey: "your-referer-key",
      language: "en", // "en" | "km"
      isDarkMode: false,
      isProduction: false, // Set to true for production
      testingEnv: "DEMO", // Ignored if isProduction is true
      isDisplayCurrencySymbol: true // Display ៛1,000 vs KHR 1000
    });

    if (result.success) {
      console.log('Top-up successful:', result.message);
    } else {
      console.log('Top-up failed:', result.message);
    }
  } catch (error) {
    console.error('Top-up error:', error);
  }
};

API Reference

Types

Bill24InstantPaymentProps

| Property | Type | Required | Description | |----------|------|----------|-------------| | userSyncCode | string | ✅ | User synchronization code from Bill24 | | refererKey | string | ✅ | Referer key provided by Bill24 | | language | "en" \| "km" | ✅ | Interface language (English or Khmer) | | isDarkMode | boolean | ✅ | Enable dark mode for payment UI | | isProduction | boolean | ✅ | Production environment flag | | testingEnv | "STAG" \| "PRODUCTION" \| "PILOT" \| "DEMO" | ✅ | Testing environment (ignored if isProduction is true) |

Bill24InstantPaymentTopUpProps

| Property | Type | Required | Description | |----------|------|----------|-------------| | paymentMethodId | string | ✅ | Payment method ID (wallet ID) from Bill24 | | refererKey | string | ✅ | Referer key provided by Bill24 | | language | "en" \| "km" | ✅ | Interface language (English or Khmer) | | isDarkMode | boolean | ✅ | Enable dark mode for payment UI | | isProduction | boolean | ✅ | Production environment flag | | testingEnv | "STAG" \| "PRODUCTION" \| "PILOT" \| "DEMO" | ✅ | Testing environment (ignored if isProduction is true) | | isDisplayCurrencySymbol | boolean | ✅ | Show currency symbol (៛1,000 vs KHR 1000) |

Bill24InstantPaymentTopUpResult

| Property | Type | Description | |----------|------|-------------| | success | boolean | Payment operation success status | | message | string? | Result message or error description |

Environment Configuration

Testing Environments

  • DEMO: For development and testing
  • STAG: Staging environment
  • PILOT: Pilot testing environment
  • PRODUCTION: Production environment (only used when isProduction is false)

Production vs Testing

When isProduction is set to true, the testingEnv parameter is ignored and the SDK uses the production environment.

Version Compatibility

| Library Version | Default B24PaymentSdk Version | |----------------|-------------------------------| | 0.1.0 | 1.1.46 |

Requirements

iOS

  • iOS 13.0+
  • Swift 5.0+
  • Xcode 15.0+

Android

  • minSdkVersion 24
  • compileSdkVersion 36
  • targetSdkVersion 36

Example App

Check out the example app in the example/ directory for a complete implementation:

cd example
npm install
npm run ios    # For iOS
npm run android # For Android

Troubleshooting

Common Issues

Android Build Issues

  • Ensure your android/gradle.properties has the correct B24PaymentSdk version
  • Check that your minSdkVersion is at least 24

iOS Build Issues

  • Make sure your deployment target is iOS 13.0+
  • Run cd ios && pod install if using bare React Native

Payment Failures

  • Verify your refererKey is correct and active
  • Check that you're using the correct environment (isProduction setting)
  • Ensure userSyncCode or paymentMethodId are valid

Security Notes

⚠️ Important Security Considerations:

  • Never hardcode production refererKey in your app
  • Always validate payment results on your backend
  • Use environment variables for sensitive configuration
  • Implement proper error handling for failed payments

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Support

For Bill24 SDK specific issues, please contact Bill24 support. For this library issues, please open an issue on GitHub.


Note: This is an unofficial library. Please refer to the official Bill24 documentation for the most up-to-date information about their payment services.