Guides
Task-oriented guides for the things maintainers build with Sponsorkit, in every SDK language.
On this page
Each guide solves one task from start to finish, with complete code for JavaScript/TypeScript, .NET, Python, Go and Rust. Pick a language once and every code block on the site follows it.
If you haven't installed an SDK yet, start with the quickstart. The ideas behind the API (targets, sessions, statuses, caching) are explained in Concepts.
Use the result#
- Gate a feature or show an ad: turn "what has this person contributed?" into your own rule.
- Show a sponsor nag in a CLI: a polite "please support this project" message every N runs.
Sign-in and checkout#
- Add a sponsor button to a web app:
<sponsorkit-button>,<sponsorkit-badge>and the popup flow, with a redirect fallback when popups are blocked. - Use Sponsorkit in a CLI or desktop app: loopback and paste-back sign-in, timeouts and cancellation.
- Open checkout and detect a new contribution: send supporters to GitHub Sponsors or Open Collective and find out when they've contributed.
Production#
- Verify supporters on your backend: a trustworthy answer on your server, with no API key.
- Test your integration: mock presets,
SPONSORKIT_MOCK,SPONSORKIT_DISABLEand CI. - Handle errors and offline: what can throw, what never throws, and how stale data is reported.