GitHub Sponsors
Users and organizations, including sponsorships paid by an organization the supporter belongs to.
- Monthly and one-time
- Tier-based amounts, in USD
Ask whether the current user sponsors you on GitHub Sponsors or Open Collective, then decide what that means: hide an ad, skip a nag, unlock a feature. No account, no API key, no stored data.
import { Sponsorkit } from "@sponsorkit/sdk";
const sk = new Sponsorkit({ github: "your-login", openCollective: "your-collective" });
const fc = await sk.getFinancialContribution();
if (fc.signedIn && fc.active().length === 0) showSupportBanner();Install the SDK, name the account you receive sponsorships on, and ask. That is the whole integration.
npm install @sponsorkit/sdkconst sk = new Sponsorkit({ github: "your-login" });
const fc = await sk.getFinancialContribution();
button.onclick = () => sk.openCheckout({ frequency: "monthly", amount: 500 });Sponsorkit reports facts. Your code decides what to do with them.
getFinancialContribution() returns amount, frequency and status per provider, cached locally.openCheckout() sends them to the right provider and notices the new contribution.Use one or both. Contributions are reported per provider and never summed or converted.
Users and organizations, including sponsorships paid by an organization the supporter belongs to.
Any collective, including contributions from organizations or collectives the supporter administers.
Sponsorkit is a single stateless Worker with no database. Everything a request needs travels in an encrypted session token that only the Worker can read, held by your app.
No. You pass the GitHub login or Open Collective slug you receive sponsorships on, and that’s it. There’s no dashboard, no key and no callback URL to register.
No. Supporters pay on GitHub Sponsors or Open Collective, exactly as they would without Sponsorkit. Sponsorkit never sees money or payment details.
Sign in once with GitHub or Open Collective from your app. They see a consent screen that names exactly which accounts you’ll check. After that, your app can ask whenever it likes.
Anything checked only on the user’s machine can be patched out; that’s true of every client-side check. If you need a trustworthy answer, send the session token to your backend and call verifySession. The token is sealed with a key only Sponsorkit has, so it can’t be forged.
Your app keeps working. SDKs never throw because of the network: they return the last cached result marked stale, or an empty signed-in result if there’s no cache yet.
They’re always returned, marked via: "organization". You decide whether they count; fc.direct() filters them out.
Yes. The API is a single stateless Cloudflare Worker with no database, and these pages are a static site. Bring your own OAuth apps and point the SDK at them with apiBaseUrl (and siteBaseUrl if the pages live elsewhere). See self-hosting.
JavaScript/TypeScript, .NET, Python, Go and Rust SDKs with the same behaviour everywhere.