Accept Donations on GitHub — FUNDING.yml Setup
Accept Donations on GitHub
Turn any GitHub repo into a donation channel in about two minutes. FastLinkIt's fundraising campaigns plug straight into GitHub's native FUNDING.yml mechanism and work as README badges — no GitHub Sponsors approval needed, no monthly fees, and donations land directly in your Stripe account. If you're enrolled in GitHub Sponsors, set your GitHub username in /Account/Manage and toggle "I'm enrolled in GitHub Sponsors" — the generated FUNDING.yml will then include github: <your-handle> alongside the custom: line so both channels show up in the Sponsor dropdown.
What you get
- A "Sponsor" button at the top of your repo, next to the Settings tab
- A pink donate badge anywhere you paste its Markdown (README, PR descriptions, issues)
- Source-tagged donations so you can see in
/payments/earningsexactly how much GitHub drove - Full donor details (name, email, optional message) — not the limited metadata GitHub Sponsors shares
Prerequisites
Before starting, make sure you have:
- A FastLinkIt account (free tier is fine)
- Stripe Connect set up — connect at
/payments/providers. This is where donations will land. - A public GitHub repo (
FUNDING.ymlshows the Sponsor button only on public repos; for private repos you can still use the README badge)
Step 1 — Create a fundraising campaign
Go to /payments/campaigns → click Create Campaign.
Fill in:
- Title — becomes part of the README badge label (kept short works best, e.g. "MyLib")
- Description — shown on the public donation page
- Target amount — your goal, displayed as a progress bar
- Currency — GBP, USD, EUR, and 11 others supported
- Suggested amounts — comma-separated (e.g.
5,10,25,50). Donors see these as one-click buttons on the donation page. - Allow custom amount — leave on unless you want to force suggested amounts only
- Short code (optional) — e.g.
mylib-donate. If blank, FastLinkIt auto-generates one. This becomes the URL path:flnk.it/{shortCode} - End date (optional) — campaign closes automatically
- Thank-you message — shown after donation completes
Save. Your campaign is now live at https://flnk.it/{shortCode}.
Step 2 — Get the GitHub snippets
Back on /payments/campaigns, find your campaign's card and click the black GitHub icon (next to Embed and WhatsApp).
A modal opens with two things to copy:
A. FUNDING.yml content
# Show a "Sponsor" button on this repo, linking to the FastLinkIt campaign.
# ?src=github tags donations so you can see which came from GitHub in /payments/earnings.
custom: ["https://flnk.it/mylib-donate?src=github"]
Click Copy FUNDING.yml.
B. README badge Markdown
[](https://flnk.it/mylib-donate?src=github)
The modal shows a live preview of how the badge will render. Click Copy badge Markdown.
Step 3 — Paste into GitHub
Two files to update in each repo where you want donations:
.github/FUNDING.yml
- In your repo, navigate to the root
- Create a folder called
.githubif it doesn't exist - Inside it, create a file named
FUNDING.yml - Paste the content from the modal
- Commit
Via the GitHub web UI: click Add file → Create new file → type .github/FUNDING.yml as the filename → paste → commit.
**Via git😗*
mkdir -p .github
printf '# FastLinkIt funding\ncustom: ["https://flnk.it/mylib-donate?src=github"]\n' > .github/FUNDING.yml
git add .github/FUNDING.yml
git commit -m "Add FUNDING.yml"
git push
Within a minute the Sponsor button appears at the top of your repo.
README.md
Open your README and paste the badge Markdown wherever you want donations visible — typically right under the project title. Example:
# MyAwesomeLibrary
[](https://flnk.it/mylib-donate?src=github)
[](https://nuget.org/packages/MyAwesomeLibrary)
[](LICENSE)
A blazing-fast library for...
Commit and push. The badge renders instantly.
Combining with other funding sources
FUNDING.yml supports multiple channels. You can list FastLinkIt alongside Patreon, Ko-fi, Open Collective, or even GitHub Sponsors itself:
github: [username]
ko_fi: username
patreon: username
custom: ["https://flnk.it/mylib-donate?src=github"]
The Sponsor button dropdown will list all of them. Let donors pick whichever they prefer.
Tracking where donations come from
Every URL FastLinkIt generates for GitHub includes ?src=github. The donation widget on the campaign page reads this and tags the resulting PaymentTransaction.Source = "github".
To see the breakdown:
/payments/transactions— filter by source (a github option appears in the source dropdown once the first tagged donation arrives)/payments/earnings— per-source revenue breakdown- REST API —
GET /api/payment/transactions?source=githubreturns only GitHub-sourced payments
You can add custom tags for other channels too. Just change the URL from ?src=github to ?src=newsletter, ?src=twitter, ?src=producthunt, etc. Every tag becomes its own filterable segment.
What the donor sees
- They click the Sponsor button or README badge
- They land on your branded donation page at
flnk.it/{shortCode} - They pick a suggested amount or enter a custom one
- They enter email, name, optional message, and whether to be anonymous
- Stripe Checkout (or PayPal if configured) handles payment
- They see a thank-you page with your custom message
- You receive the funds directly to your connected Stripe account, minus Stripe's standard fee and FastLinkIt's small platform commission
Troubleshooting
The Sponsor button doesn't appear. It can take a few minutes after commit. Also verify the repo is public — GitHub only shows the Sponsor button on public repos. For private repos, use the README badge which renders identically.
FUNDING.yml is invalid. GitHub is strict about YAML syntax. Make sure:
- The
custom:field is an array (wrap the URL in["..."]) - URLs use double quotes, not single
- No tabs — YAML requires spaces for indentation
- File is in
.github/FUNDING.ymlexactly (not.github/funding.yml)
The badge shows but the link goes to a 404. Your campaign's short code might have changed, or the campaign is inactive. Go to /payments/campaigns, verify the campaign is active and the short code matches the URL.
Donations come through but no source=github tag. Check your badge/FUNDING.yml URL contains ?src=github exactly. If you manually wrote the URL without the tag, add it — the auto-generated URLs in the modal always include it.
Payment fails with "no Stripe account." Connect Stripe at /payments/providers. Campaigns require an active Stripe Connect account to receive payments.
Amounts below suggested minimum are rejected. Edit the campaign and adjust MinDonation. If unset, any amount above zero is accepted.
FAQ
Do I need a GitHub Sponsors account?
No. FastLinkIt uses GitHub's FUNDING.yml — a separate mechanism that works for any public repo without application or approval. GitHub Sponsors itself requires a manual application.
What does it cost?
Stripe's standard processing fee (usually 1.5–2.9% + 30p/€0.30 per transaction) plus FastLinkIt's small platform commission. No monthly fees, no setup fees.
Can I use the same campaign across multiple repos?
Yes. Paste the same FUNDING.yml and badge Markdown into every repo. All donations flow to the same campaign and show up together in your dashboard.
Can donors give recurring donations?
Currently one-off donations only. Recurring donations via Stripe subscriptions are on the roadmap.
Can I remove the Sponsor button later?
Yes. Just delete .github/FUNDING.yml — the button disappears immediately. You can also deactivate the campaign in /payments/campaigns, which makes donations fail but keeps the button showing.
What if my project has multiple maintainers?
Create a team organisation in FastLinkIt (/organization), invite your co-maintainers, and let the organisation own the campaign. Donations land in the organisation's Stripe account, and all members can see transactions.
Can I use this on GitLab or Codeberg?
GitLab doesn't support FUNDING.yml, but the README badge Markdown works identically on any platform that renders Markdown — GitLab, Bitbucket, Codeberg, SourceHut, etc.
Related
- Fundraising campaigns — manage your campaigns
- Payment providers — connect Stripe and PayPal
- Transactions dashboard — see every donation with source tags