Flexible Donations for Stripe lets you accept donations directly through
Stripe Checkout, the PCI-compliant hosted payment page. Donations go straight to your Stripe account - no transaction fees beyond Stripe's own.
Key Features
- One-time & recurring donations - donors choose either payment type
- Custom amount input - donors enter any amount they want
- Predefined amount buttons - quick-select popular donation amounts
- Flexible billing intervals - daily, weekly, monthly, quarterly, or yearly
- Sandbox / Test mode - store separate test keys and switch live/test anytime without touching your live keys
- Email confirmations - automatic thank-you emails with dynamic placeholders
- Donation tracking - every session logged in the database
- Webhook support - real-time payment confirmation via Stripe webhooks
- AJAX or REST API submission - choose between
admin-ajax.php and the WordPress REST API if your host blocks AJAX for visitors
- Multi-currency - works with any Stripe-supported currency
How it works
The plugin renders a shortcode form. When a donor submits it, a Stripe Checkout Session is created and the donor is redirected to Stripe's hosted payment page. Stripe sends a webhook back to your site to confirm the payment, mark the donation completed, and send the thank-you email.
This plugin is an interface to the
Stripe payment service. By configuring it with your Stripe API keys you consent to sending donation data (donor email and amount) to Stripe for processing. Review Stripe's
Terms of Service and
Privacy Policy before use.
Live vs Test mode
- Live mode - processes real payments with your
sk_live_ keys
- Test mode - processes test payments with
sk_test_ keys (use test card 4242 4242 4242 4242)
Your live keys are stored separately and are never touched when you switch modes. A warning banner is shown in settings while test mode is active.
- Upload the
flexible-donations-for-stripe folder to /wp-content/plugins/
- Activate the plugin through the Plugins menu in WordPress
- Go to Settings → Stripe Integration and enter your Stripe Secret Key, Publishable Key, and Webhook Secret (from Stripe Dashboard → Developers)
- Add the
[fdfs_donation_form] shortcode to any page
Webhook setup
- In Stripe Dashboard, go to Developers → Webhooks and click Add endpoint
- Enter your webhook URL:
https://yoursite.com/wp-json/fdfs/v1/webhook
- Subscribe to these events:
checkout.session.completed
invoice.payment_succeeded
customer.subscription.deleted
- Copy the signing secret (
whsec_...) and paste it in the plugin settings
- If using test mode, create a second webhook endpoint in Stripe's test mode and paste its secret in the test webhook field
Composer note
The Stripe PHP SDK is bundled with the plugin, so no Composer installation is required.