Pay Hero Donations Plugin – WordPress



  • Version
  • Download 0
  • File Size 43.09 KB
  • File Count 1
  • Create Date February 10, 2026
  • Last Updated February 10, 2026
Description

Pay Hero Donations is a lightweight WordPress plugin that integrates the Pay Hero Button SDK (v3.1). It allows site owners to accept donations or payments via mobile money (M-Pesa) by embedding a customizable form and payment button using a simple shortcode.


Features

  • Admin Configuration: Easy management of Payment URLs, Channel IDs, and button styling.

  • Frontend Shortcode: Use [payhero_donate] to render a professional donor input form.
  • Dynamic Reference: Automatically generates a unique transaction reference for every payment attempt.

  • SDK Integration: Fully integrated with button_sdk.js v3.1 for secure processing.

  • Real-time Feedback: Listens for payment success/failure events and updates the UI instantly without page reloads.


Installation

  1. Download: Save the plugin as a .zip file.

  2. Upload: Go to your WordPress Dashboard, navigate to Plugins > Add New > Upload Plugin, and select your zip file.

  3. Activate: Click Activate once the upload is complete.


Settings

To get started, navigate to Settings > Pay Hero Donations and configure the following:

Setting Description
Lipwa Link Your Pay Hero Lipwa Link (e.g., https://app.payhero.co.ke/lipwa/5)
Channel ID Your specific Pay Hero Channel ID (e.g., 100)
Styles Customize your preferred button text and brand colors

Usage

To display the donation widget on your site, simply place the following shortcode on any Page, Post, or Text Widget: [payhero_donate]

Live Demo

Make a donation

Choose an amount
KES 100
KES 500
KES 1K
KES 2K
KES 5K
KES 10K
Custom Amount
KES
Your Details

Note:
Ensure your Pay Hero account is active and your Channel ID is correct to avoid transaction errors during checkout.