Skip to main content

Install the packages

For server-side operations (session tokens, entitlements), install the Node SDK separately:

Peer dependencies

The React SDK requires these peer dependencies:
Most React projects already have react and react-dom. You just need to add @tanstack/react-query if you don’t have it already.

Requirements

  • React 18.0 or later (React 19 supported)
  • Node.js 18.0 or later (for the server SDK)

Environment variables

Add your BillingOS secret key to your server environment:
.env.local
Your secret key starts with sk_test_ (sandbox) or sk_live_ (production). Never expose it in client-side code.
You can find your API keys in the BillingOS Dashboard.

Next step

Set up the BillingOSProvider to connect the SDK to your app.