Donation Form in HTML — Working Code for Nonprofits
An HTML donation form with preset amounts ($25/$50/$100), custom amount, one-time vs recurring toggle, and donor info. Capture the intent with splitforms; process the payment via Stripe Payment Element on the next page.
Donation forms have a specific UX shape that converts. Preset amounts (radio buttons, large hit targets) for the common values; a custom amount field for everything else. Frequency toggle (one-time vs monthly) — monthly recurring is the highest-leverage option for nonprofits, so default to it if your audience supports it. Donor info kept minimal: name, email, optional note.
The form above captures the donation *intent*. The actual payment processing happens on the next page via Stripe Payment Element (or your processor of choice). splitforms's `/api/submit` endpoint accepts the intent, emails you, and 302s the donor to your payment page. The payment page reads the amount from URL params or from the splitforms session.
Why split intent from payment? Two reasons. (1) PCI compliance: card data should only touch your Stripe checkout, never your form backend. (2) Conversion: capturing the intent first lets you follow up if the donor abandons before payment — 'You started a $50 donation' email recovery flow.
For tax-deductible donations (US 501c3), capture the donor's mailing address on a follow-up form after payment succeeds. splitforms's dashboard exports CSV that imports cleanly into donor-management platforms (Bloomerang, DonorPerfect, Salesforce NPSP).
How to set this up
Preset amounts as radio buttons
Common amounts ($25, $50, $100, $250) plus a custom-amount input. Hit targets large enough for mobile.
One-time vs monthly toggle
Default to monthly if your audience supports recurring. Highest-leverage donation type for nonprofits.
Capture intent, then redirect to payment
splitforms emails you the intent and 302s the donor to your Stripe Payment Element page.
Follow up on abandoned intents
Email donors who submitted the intent form but didn't complete payment within 24 hours. Recovery typically 10-20%.
Capture intent, redirect to Stripe payment. Don't handle card data in the form.
Frequently asked questions
How do I process the payment from a donation form?
Don't process card data in the form itself — handle it on a dedicated Stripe Payment Element page after the intent form. The intent form captures donor info + amount; redirects to /donate/payment?amount=50; the payment page renders Stripe Payment Element wired to your donation account.
How do I support recurring donations?
Use Stripe's subscription product, not one-time payments. The donor's first payment creates a Stripe subscription; subsequent monthly charges happen automatically. The form just captures the frequency choice (one-time vs monthly).
How do I send tax receipts?
Trigger a Stripe Customer Portal email on payment success, or send a custom receipt email via your transactional email service (Postmark, Resend). The receipt must include the nonprofit's EIN and a statement that no goods/services were exchanged for the donation.
Can I keep donor information GDPR-compliant?
Yes — splitforms ships a documented GDPR DPA and EU residency option. Add a consent checkbox to the form ('I agree to splitforms storing my submission for the purpose of processing this donation') and you're covered for the form-level data handling.
What about anonymous donations?
Add an 'Make this donation anonymous' checkbox. When checked, splitforms still receives the donor info (you need it for the receipt) but mark it as anonymous in your donor-management system so it doesn't appear in public donor lists.
Related guides
Ship the form, not the backend.
Free for 1,000 submissions/month. Email delivery, AI spam filtering, signed webhooks, real dashboard — all on the free plan. No credit card.
Get a free access key →