@fonderie/react-native-billing
v0.2.2
Published
React Native billing hooks for Fonderie — re-exports @fonderie/react-billing (no platform-specific code: no storage, no DOM/RN APIs).
Downloads
236
Maintainers
Readme
@fonderie/react-native-billing
React Native billing hooks for Fonderie — re-exports
@fonderie/react-billing
wholesale. Unlike auth, billing hooks own no storage of their own (they read
the access token @fonderie/auth already set on the shared client), so
there's no platform-specific code to fork — the same usePlans,
usePlan, useSubscription, useCheckout, useBillingPortal, useUsage,
useRecordUsage, and in-app card-management hooks (usePaymentMethod,
useSetupPaymentMethod, useSavePaymentMethod, useRemovePaymentMethod)
work in React Native as-is — pair them with a native Stripe SDK / payment
sheet for card entry.
Install
npm install @fonderie/react-native-billingUse
import { FonderieClient } from '@fonderie/client';
import { usePlans, useCheckout } from '@fonderie/react-native-billing';
import { Linking } from 'react-native';
const client = new FonderieClient({ baseUrl: 'https://api.example.com/v1' });
function Pricing() {
const { plans } = usePlans(client.billing);
const { checkout } = useCheckout(client.billing);
return (
<>
{plans.map((plan) => (
<TouchableOpacity
key={plan.id}
onPress={async () => Linking.openURL(await checkout({ plan: plan.name }))}
>
<Text>{plan.name}</Text>
</TouchableOpacity>
))}
</>
);
}Want pre-built screens instead of wiring your own pricing table?
See @fonderie/react-native-billing-screens.
Why this exists
You've shipped this plumbing before — auth, teams, billing, messaging —
and the next project will ask for it again. Fonderie packages it once:
plain TypeScript modules for
@fonderie/core,
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
per-seat anything. Register the modules you need; skip the ones you don't.
This package owns making @fonderie/react-billing's hooks installable
under the React Native naming convention, so an agent or developer looking
for "billing hooks for my Expo app" finds them without having to know the
hooks happen to be framework-agnostic under the hood.
Browse the whole set at fonderiejs/sdk · follow @fonderiejs
License
MIT © Fonderie, Inc.
