<PushWidget> component that renders the card-entry form and tokenizes the card. When authorize-payment returns 202 Accepted, complete authentication by opening the returned URL in an in-app browser tab.
For the payment flow itself — registering users, authorizing, handling declines, withdrawals, refunds — follow the Card Payments guide. This page documents only the client-side surface.
Open source
The SDK is published from a public repository at github.com/pushcashco/react-native under the MIT license, with no closed-source binaries.Install
react (>=18.2), react-native (>=0.74 <1.0.0), and react-native-webview (>=13.8 <17) are peer dependencies. The package contains no native code, so it sets no minimum iOS or Android version of its own — yours are whatever your React Native version requires.
The package is pure JavaScript, so it runs in Expo Go with no development build. In a bare React Native app, run npx pod-install ios for react-native-webview.
<PushWidget>
Renders the Push card-entry form. Collect a card, then call tokenize() through a ref from your submit handler to get a one-time token for authorize-payment. Enable your submit button from onValid.
The form is Push-hosted content rendered in a WebView, so card details are entered into Push’s page and never pass through your application code.
Props (PushWidgetProps)
Ref (PushWidgetRef)
Attach a ref to call:
Example
Completing authentication
When authorize-payment returns202 Accepted, the user must authenticate with their bank before the payment can be processed. The response carries a url to present.
Set redirect_url on the authorization request. Push uses it both to configure the bank authentication handoff for an app rather than a browser, and to return the user to your app when the flow ends. Omit it and the user is stranded on the bank’s page.
Opening the URL
The SDK does not wrap this — it is a URL and an operating-system API, with no meaningful abstraction to add in between.expo-web-browser’s openAuthSessionAsync covers both platforms and resolves when the redirect returns the user to your app:
react-native-inappbrowser-reborn’s openAuth() wraps the same two APIs. You can also call them directly and handle the return through React Native’s Linking API.
On iOS,
ASWebAuthenticationSession shows a system alert (“YourApp” Wants to Use “pushcash.com” to Sign In) whenever the session would share cookies with Safari. Running it as an ephemeral session suppresses the alert, but starts with no Safari cookies — so a bank that would otherwise have recognized the device may challenge the user again. iOS offers no option that gives both.Android is unaffected: Chrome Custom Tabs share the browser’s cookie jar with no prompt.The redirect URL
When the flow ends, Push navigates to yourredirect_url with the intent ID appended:
intent_id is the only parameter — no status. Fetch the outcome with get-an-intent.
- Use a custom scheme. Include a host component:
yourapp://push/completeparses reliably,yourapp:completedoes not.http://is rejected. - Universal Links require iOS 17.4 or later, plus an
apple-app-site-associationfile and an Associated Domains entitlement. Below 17.4 an authentication session cannot intercept anhttpscallback, so the link reopens your app without closing the session. - Don’t use
intent_idin your own query string. It is appended to whatever you supply.
Registering the scheme
Your app must claim the scheme, or the redirect will not reach it. Do this once, in whichever setup applies — the two are alternatives, not steps. Expo — set it inapp.json. prebuild generates the native entries for both platforms, so there is nothing else to edit:
ios/YourApp/Info.plist:
android/app/src/main/AndroidManifest.xml: