Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

React-Native-Paystack-WebView

> 前端框架
Open source

The package allows you accept payment using paystack and guess what, it doesn't require linking! just install and begin to use

198 stars0 likes2 views
WebsiteGitHub

About

The package allows you accept payment using paystack and guess what, it doesn't require linking! just install and begin to use

React Native Paystack WebView (v5)

Modern, hook-based, Paystack-powered payments in React Native apps using WebViews — now streamlined with Provider architecture & fully customizable.

Endorsed by Paystack, so you know you’re in good hands. Payment processing has never been this easy!


Installation

bash
npm install react-native-paystack-webview
# or
yarn add react-native-paystack-webview

Peer Dependency

bash
yarn add react-native-webview

# iOS
cd ios && pod install

# Expo
npx expo install react-native-webview

⚡ Quick Start

Wrap your app with the Provider

typescript
import { PaystackProvider } from 'react-native-paystack-webview';

  

Use in a component

…

Features

  • ✅ Simple checkout() or newTransaction() calls
  • ✅ Global callbacks with onGlobalSuccess or onGlobalCancel
  • ✅ Debug logging with debug prop
  • ✅ Fully typed params for transactions
  • ✅ Works seamlessly with Expo & bare React Native
  • ✅ Full test coverage
  • ✅ Zap integration

API Reference

PaystackProvider

Prop Type Default Description
publicKey string — Your Paystack public key
currency string — Currency code (optional)
defaultChannels string[] ['card'] Payment channels
deepLinkHosts (string | RegExp)[] [] Extra hosts to hand off to the OS instead of loading in the WebView (see Deep linking)
debug boolean false Show debug logs
onGlobalSuccess func — Called on all successful transactions
onGlobalCancel func — Called on all cancelled transactions

popup.checkout() / popup.newTransaction()

Param Type Required Description
email string ✅ Customer email
amount number ✅ Amount in Naira (not kobo)
reference string — Custom reference (optional)
metadata object — Custom fields / additional info
plan string — Paystack plan code (for subscriptions)
invoice_limit number — Max charges during subscription
subaccount string — Subaccount code for split payment
split_code string — Multi-split identifier
split object — Dynamic split object
onSuccess (res) => void ✅ Called on successful payment
onCancel () => void ✅ Called on cancellation
onLoad (res) => void — Triggered when transaction view loads
onError (err) => void — Triggered on WebView or script error

Meta Props

Name Description Required? Default Value
cart_id A unique identifier for the cart. Can be either a string or a number. NO undefined
custom_fields An array of custom fields for adding additional metadata to the transaction. If not passed, a default custom field is created using the firstName, lastName, and billingName. NO [{ display_name: '${firstName + ' ' + lastName}', variable_name: '${billingName}', value: '' }]
cancel_action A string specifying the action to take if a transaction is canceled. NO undefined
custom_filters Custom filters to restrict or specify transaction options, such as: NO undefined
- recurring: A boolean to indicate if the transaction is recurring.
- banks: An array of bank codes for supported banks.
- card_brands: Supported card brands, e.g., 'verve', 'visa', 'mastercard'.
- supported_mobile_money_providers: Supported mobile money providers, e.g., 'mtn', 'atl', 'vod'.

Dynamic Multi-Split Payment Object structure

Name use/description required?
type Dynamic Multi-Split type. Value can be flat or percentage YES
bearer_type Defines who bears the charges. Value can be all, all-proportional, account or subaccount YES
subaccounts An array of subaccount object as defined below. e.g. {"subaccount": 'ACCT_xxxxxx', "share": 60} YES
bearer_subaccount Subaccount code of the bearerof the transaction. It should be specified if bearer_type is subaccount NO
reference Unique reference of the split. Can be defined by the user NO

Dynamic Multi-Split Payment Sub-Account Object structure

Name use/description required?
subaccount Specify subaccount code generated from the Paystack Dashboard or API to enable Split Payment on the transaction. Here's an example of usage: subaccount: "SUB_ACCOUNTCODE" YES
share Defines the amount in percentage (integer) or value (decimal allowed) depending on the type of multi-split defined YES

Deep linking

Some payment channels need to hand off to a partner app. For example, the Zap channel renders a universal link to https://joinzap.com/app/... that should open the Zap app.

WKWebView on iOS does not perform universal-link handoff or custom-scheme dispatch for navigations that originate inside the WebView, so tapping such a link would otherwise just load it as a web page. To fix this, the provider intercepts these navigations and forwards them to the OS via Linking.openURL, which triggers the universal-link handoff (iOS) or App Links / `Int

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptarchivedmobilepaymentpayment-gateway

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架