Offer SDK documentation
A self-hosted API, dashboard and React SDK for plans, entitlements and offers. Integrate once, then change what any account can do from the dashboard, with no deploy.
Most apps hardcode pricing: a plan name checked in a dozen places, a trial extended by editing a row, a partner discount handled with an if statement. Offer SDK moves those decisions into records you edit in a dashboard. Your app asks one question, “what can this account do?”, and gets back one answer that already includes the plan, any add-ons, the offer it bought through and any incentive on top.
The three parts
- Offer API
- A Hono service on Bun with Postgres. It stores every app, account, plan and offer, resolves access, prices checkouts through PayPal and sends signed webhooks.
- Dashboard
- A Next.js app (offer-app) where your team edits the catalog, builds offers and cancel flows, reads analytics, manages keys and webhooks, and chats with an agent that can make changes for you.
- React SDK
- Providers and hooks that read an account's access in your app, plus headless components for a checkout page and a cancel flow that you style like the rest of your product.
How it fits together
You deploy all of it yourself: the API, the dashboard, a Render Workflows service and a Postgres database, from one Blueprint. Your app talks to the API with app keys; the dashboard talks to it with a shared admin key.
Built for the PayPal AI Hackathon
Offer SDK is an entry in the PayPal AI Hackathon. PayPal handles every payment, Render hosts the stack and runs pauses as Workflows, Zapier carries webhooks to other apps, and Postman has a request for every API route. How sponsors are used covers each one, and AI features covers where AI picks save offers and runs the dashboard agent.