For open source maintainers

Sponsorships, built into your software.

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.

app.ts
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();

A three-line quickstart

Install the SDK, name the account you receive sponsorships on, and ask. That is the whole integration.

Terminal
npm install @sponsorkit/sdk
app.ts
const sk = new Sponsorkit({ github: "your-login" });
const fc = await sk.getFinancialContribution();
button.onclick = () => sk.openCheckout({ frequency: "monthly", amount: 500 });

How it works

Sponsorkit reports facts. Your code decides what to do with them.

  1. Name your accountsPass your GitHub login and/or Open Collective slug to the SDK. Nothing to register.
  2. Supporter signs in onceA consent screen shows exactly which accounts are checked. Works in browsers, CLIs and over SSH.
  3. Ask any timegetFinancialContribution() returns amount, frequency and status per provider, cached locally.
  4. Invite them to contributeopenCheckout() sends them to the right provider and notices the new contribution.

Providers

Use one or both. Contributions are reported per provider and never summed or converted.

GitHub Sponsors

Users and organizations, including sponsorships paid by an organization the supporter belongs to.

  • Monthly and one-time
  • Tier-based amounts, in USD

Open Collective

Any collective, including contributions from organizations or collectives the supporter administers.

  • One-time, monthly and yearly
  • Any amount, in the collective’s currency

Nothing stored. Nothing to leak.

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.

Read the wire protocol

  • No database, no accounts, no analytics, no cookies beyond a 10-minute sign-in nonce.
  • Supporters see exactly which accounts are checked before they sign in.
  • Your app only ever learns about the accounts you named, never anything else.
  • Supporter ids are pairwise: apps with different accounts can’t correlate users.
  • Provider tokens never leave the Worker in readable form.
  • Sign-out is local. Revoking access at GitHub or Open Collective ends it everywhere.

Questions

Do I need an account, API key or webhook?

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.

Does Sponsorkit take a cut or handle payments?

No. Supporters pay on GitHub Sponsors or Open Collective, exactly as they would without Sponsorkit. Sponsorkit never sees money or payment details.

What does the supporter have to do?

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.

Can users fake being a sponsor?

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.

What happens if Sponsorkit or a provider is down?

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.

Do sponsorships through an organization count?

They’re always returned, marked via: "organization". You decide whether they count; fc.direct() filters them out.

Can I run it myself?

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.

Ready when you are.

JavaScript/TypeScript, .NET, Python, Go and Rust SDKs with the same behaviour everywhere.