
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
@moonpay/react-native-moonpay-sdk
Advanced tools
The MoonPay Mobile SDK enables you to integrate the MoonPay widget so you can facilitate crypto purchases within your platform.
The MoonPay React Native SDK enables you to integrate the MoonPay widget so you can facilitate crypto purchases within your platform.
For detailed integration instructions and further documentation, please visit our Documentation Site.
To install the package, use npm or yarn:
npm install --save @moonpay/react-native-moonpay-sdk
or
yarn add @moonpay/react-native-moonpay-sdk
Before using this package, make sure you have the following:
useMoonPaySdk
hook in you React Native componentimport { useMoonPaySdk } from '@moonpay/react-native-moonpay-sdk';
If you want to display the widget in a WebView:
const { MoonPayWebViewComponent } = useMoonPaySdk({
sdkConfig: {
flow: 'buy',
environment: 'sandbox',
params: {
apiKey: 'pk_test_123',
},
},
});
return (
<View>
<MoonPayWebViewComponent />
</View>
);
If you want to display the widget in an In-App browser:
import { InAppBrowser } from 'react-native-inappbrowser-reborn';
const { openWithInAppBrowser } = useMoonPaySdk({
sdkConfig: {
flow: 'buy',
environment: 'sandbox',
params: {
apiKey: 'pk_test_123',
},
},
browserOpener: {
open: async (url: string) => {
if (await InAppBrowser.isAvailable()) {
await InAppBrowser.open(url);
}
},
},
});
return (
<View>
<Button onPress={openWithInAppBrowser} />
</View>
);
expo-web-browser
import * as WebBrowser from 'expo-web-browser';
const { openWithInAppBrowser } = useMoonPaySdk({
sdkConfig: {
flow: 'buy',
environment: 'sandbox',
params: {
apiKey: 'pk_test_123',
},
},
browserOpener: {
open: async (url: string) => {
await WebBrowser.openBrowserAsync(url);
},
},
});
Linking
import { Linking } from 'react-native';
const { openWithInAppBrowser } = useMoonPaySdk({
sdkConfig: {
flow: 'buy',
environment: 'sandbox',
params: {
apiKey: 'pk_test_123',
},
},
browserOpener: {
open: async (url: string) => {
await Linking.openURL(url);
},
},
});
return (
<View>
<Button onPress={openWithInAppBrowser} />
</View>
);
FAQs
The MoonPay Mobile SDK enables you to integrate the MoonPay widget so you can facilitate crypto purchases within your platform.
The npm package @moonpay/react-native-moonpay-sdk receives a total of 967 weekly downloads. As such, @moonpay/react-native-moonpay-sdk popularity was classified as not popular.
We found that @moonpay/react-native-moonpay-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.