can() shows used: 1 for a customer. Everything here runs on your backend. React pricing and checkout are covered in Next steps.
1
Get a secret key
Sign up at app.nozle.dev, create a workspace, then open Developers > API keys and create a secret key.You should have: a key that starts with
sk_. Store it as NOZLE_SECRET_KEY in your backend environment.2
Install the SDK
- Node.js
- Python
- Go
3
Create the client
The SDKs readNOZLE_SECRET_KEY when you do not pass a key.- Node.js
- Python
- Go
nozle.ts
Nozle: pass apiKey or set the NOZLE_SECRET_KEY environment variable, Python raises ValueError, and Go panics with nozle: apiKey must not be empty (pass it or set NOZLE_SECRET_KEY). The variable is not set in the process that runs your code.4
Create a feature, a plan, a customer and a subscription
In the dashboard:- Create a metered feature with code
api_calls. - Create a free plan with code
quickstart_free. Add the feature with count aggregation and a limit of 10,000. - Create a customer with external ID
customer_123. - Activate a subscription for that customer on
quickstart_free.
customer_123 with one active subscription on quickstart_free.5
Send your first event
The event name is the feature code,api_calls. Each event adds one to the count; tokens is metadata and does not change it.- Node.js
- Python
- Go
6
Read it back
- Node.js
- Python
- Go
used: 1, limit: 10000 and remaining: 9999.If used is 0: events are processed asynchronously, so wait a few seconds and call can() again. If it stays at 0, check that the event name matches the feature code exactly (api_calls) and that the event was sent for the customer you are reading.can() is a point-in-time check and does not reserve quota. Treat a dependency error as an unavailable decision, not as a denial.Next steps
- Production integration checklist: event delivery, credits, cost rating and payments, before you accept customer traffic.
- Show a pricing table and checkout with
@nozle-js/react, and the merchant backend that creates checkout sessions. - SDK references: Node.js, Python, Go.
- Billing concepts and entitlements.