Plugin

WordPress Plugin

Accept M-Pesa payments directly on your WordPress site or WooCommerce store. No-code setup, automated order updates, and shortcode payment forms.

Download Plugin

Features

The PayNexus WordPress plugin is designed for both WooCommerce stores and standalone WordPress sites.

WooCommerce Integration

Seamless M-Pesa gateway for WooCommerce. Customers pay via STK Push at checkout and orders update automatically.

Shortcode Payment Forms

Embed customizable payment forms anywhere using [paynexus_payment_form]. No WooCommerce needed.

Automated Order Updates

Orders are marked as paid automatically after M-Pesa confirmation via webhooks. No manual action required.

WordPress Admin Records

All payments are logged in your WordPress admin for easy reconciliation and record keeping.

Installation

Get the plugin running in under 2 minutes.

1

Download the Plugin ZIP

Grab the latest version from the WordPress Plugin Directory or download it directly.

2

Upload in WordPress Admin

Go to Plugins → Add New → Upload Plugin in your WordPress dashboard. Select the ZIP file and click Install Now.

3

Activate the Plugin

After installation, click Activate Plugin. You'll see a new PayNexus menu item in your admin sidebar.

4

Enter Your API Keys

Navigate to PayNexus → Settings and paste your public and secret API keys. Save changes to connect your payment account.

WooCommerce Checkout

Enable PayNexus as a payment gateway for your WooCommerce store.

1

Enable the Gateway

Go to WooCommerce → Settings → Payments. Find M-Pesa (PayNexus) and click Set up or Enable.

2

Configure Settings

Enter your API keys and select the default payment account. You can also set the payment title and description shown at checkout.

3

Customer Checkout Flow

Customers select M-Pesa at checkout, enter their phone number, and confirm the STK Push on their phone. Orders update to Processing once payment is confirmed.

WooCommerce Compatibility

Works with WooCommerce 5.0+. Make sure you have the latest version of both WooCommerce and the PayNexus plugin for best results.

Shortcode Payment Forms

Use the [paynexus_payment_form] shortcode to embed payment forms on any page, post, or widget. No WooCommerce required.

Basic Usage

text
[paynexus_payment_form]

This renders a default payment form with a customer-entered amount field.

With Attributes

text
[paynexus_payment_form 
  amount="1000" 
  description="Service payment" 
  reference="PAYNEXUS"
]

Attributes

Attribute Description Default
amount Fixed amount in KES. Leave empty to let the customer enter the amount. Customer enters amount
description Payment description shown to the customer. "M-Pesa Payment"
reference Unique payment reference (invoice, order, or booking ID). Auto-generated

Use Cases

Shortcode forms work for any payment scenario on WordPress:

Donations

Accept contributions with custom descriptions.

Memberships

Collect membership fees and subscription payments.

Bookings

Take deposits or full payments for appointments.

Invoices

Send payment links tied to invoice references.

Deposits

Collect down payments before service delivery.

Service Payments

One-time or recurring payments for services.

Plugin Settings

After activation, configure the plugin from PayNexus → Settings in your WordPress admin:

Setting Description
Public Key Your pk_ key for read operations. Used for verifying payment status on the frontend.
Secret Key Your sk_ key for write operations. Used server-side to initiate payments. Never expose publicly.
Payment Account Select which PayNexus payment account (Till/Paybill) to use for transactions.
Webhook URL Auto-generated endpoint for receiving payment confirmations. Keep this secure.
Currency Default currency for payments. Typically KES (Kenyan Shilling).

Troubleshooting

STK Push not triggering

Ensure your secret key is correctly entered in PayNexus → Settings. Also verify that your phone number is in the correct format (2547...) and that your M-Pesa account is active.

Order status not updating

Check that your webhook URL is reachable from the public internet. If using a firewall or security plugin, allow requests from PayNexus IPs. Also ensure WP_CRON is functioning on your site.

Plugin not visible after upload

Make sure the ZIP file structure is correct — the main plugin file should be at the root of the ZIP, not inside a subfolder. Re-upload if necessary.