The Payments SDK for React enables you to subscribe users using React-specific features.
Getting Started
1. Install the SDK
Install the SDK with your preferred package manager.
npm install @microapp-io/react
yarn add @microapp-io/react
pnpm add @microapp-io/react
2. Wrap Your App with the Provider
In order for your microapp to have access to payments features, it needs to be wrapped in the SubscriptionProvider component:
import { SubscriptionProvider } from "@microapp-io/react";function App() { return <SubscriptionProvider>{/* Your microapp code here */}</SubscriptionProvider>;}
For local development, we recommend using the sandbox feature on the SubscriptionProvider component to return mocked subscriptions: