Pay Hero Donations lets you run multiple independent donation campaigns on WordPress. Each campaign has its own public page, branding, payment methods, Channel ID, and fundraising totals.
Visitors browse active campaigns on /ph_donations, open a campaign, then donate through a multi-step widget: choose how to pay (which sets the currency), enter an amount, then complete their details. M-Pesa is processed in KES through the Pay Hero Button SDK (v3.1). Card is processed in USD through PayHero checkout.
Features
- Multiple campaigns: Each donation has a unique key, name, description, featured image, Channel ID, status, and payment methods.
- Public donations page: The plugin creates
/ph_donationsautomatically. Active campaigns appear as cards; clicking a card opens/ph_donations/{donation_key}/with the form already embedded. - Payment methods per campaign: Enable M-Pesa (KES), Card (USD), or both. When both are on, the widget starts with method selection.
- Multi-step donation widget: Method → amount (with suggested amounts) → donor details → pay.
- Fundraising targets: Optional KES progress tracker, updated from successful M-Pesa donations.
- Admin dashboard: Manage campaigns under PayHero Donations (All Donations, Add New, Settings), including recent donations and totals.
- Shortcodes: Embed a campaign form or the campaign grid on any page.
- Unique references: Every payment attempt gets a unique reference tied to that campaign.
- Callbacks & recording: Successful payments are recorded via REST callback and AJAX, with instant on-page success for M-Pesa.
Installation
- Download: Save the plugin as a
.zipfile. - Upload: Go to Plugins > Add New > Upload Plugin and select the zip file.
- Activate: Click Activate.
- Open PayHero Donations > Settings and enter your PayHero credentials, then create a campaign under Add New.
If campaign URLs return 404 after activation, go to Settings > Permalinks and click Save.
Settings
Configure shared PayHero details at PayHero Donations > Settings (not under Settings).
Each campaign can also set name, description, featured image, status, payment options (M-Pesa and/or Card), Channel ID, and an optional KES fundraising target.
Usage
The donations listing at /ph_donations is created automatically. No shortcode is required for that page.
To embed a campaign form on another page:
[payhero_donate key="your_donation_key"]
is an alias of the same widget.[payhero_donate_global]
To embed the campaign grid:
[payhero_donations_grid]
Note: Keep your PayHero account active, set a Lipwa Link and Channel ID, and add a PayHero Account ID if you accept card payments.
Demo:
Donations