WordPress integration

M-Pesa and USDT payments on any WordPress site

Not every WordPress site is a shop. If you take donations, deposits, ticket money or one-off invoices, you do not need a cart, stock or shipping rules. You need a button. The E-Sarif WordPress plugin adds one as a block or a shortcode, and takes M-Pesa or stablecoin behind it.

  • In development
  • Publishers, NGOs, schools and service businesses on WordPress
  • No cart required

Honest status: the WordPress plugin is in development. The WooCommerce plugin and the REST API are further along, so check with the team before you plan a campaign date around this page.

Which one do I need

WordPress plugin or WooCommerce plugin?

Both run on the same E-Sarif merchant account and the same checkout sessions. The question is whether your site has a shop in it. Installing WooCommerce purely to collect a deposit is a common and expensive mistake.

Choosing between the E-Sarif WordPress plugin and the WooCommerce plugin
If this is youUse this
You sell products with a cart, stock and shippingUse the WooCommerce plugin. It hooks into order statuses, stock and the WooCommerce refund flow.
You take donations or contributionsUse the WordPress plugin. A donation is a single amount, often chosen by the giver, with no cart behind it.
You collect deposits or booking fees for a serviceUse the WordPress plugin. Put a fixed-amount button on the service page.
You sell tickets or course places from a landing pageUse the WordPress plugin, with a quantity field if you need one.
You invoice clients individually for varying amountsUse payment links instead. Nothing needs to live on your site at all.
You need a full storefront with accounts and order historyUse WooCommerce. The WordPress plugin deliberately does not try to be a shop.

What people build with it

Four setups that come up constantly

Donations and fundraising

A church, school committee or community fundraiser puts a give block on a campaign page with a buyer-chosen amount. Local supporters give over M-Pesa. Diaspora supporters give in USDT, which avoids a card conversion fee and a bank in the middle. Each campaign page carries its own reference, so the treasurer can reconcile per campaign instead of per month.

Deposits for a service business

A photographer, contractor or clinic asks for a fixed booking deposit before a slot is held. A fixed-amount button on the service page replaces the paybill-and-screenshot routine, and the payment record in the admin tells you the slot is genuinely paid for.

Tickets and course places from a landing page

An event or a short course sells from one page. A button with a quantity is enough; a full ecommerce stack is not. You get the buyer name and reference against every payment for the door list.

One-off client invoices

If the amount changes every time, do not build it into your site at all. Use a payment link per invoice and send it over email or WhatsApp.

WordPress payment button flow: the visitor clicks the payment block, your site creates a checkout session server-side, the visitor pays by M-Pesa or stablecoin, a signed webhook is delivered, and the payment is recorded in your WordPress admin.01Visitor clicks the payment block02Your site creates a session03Visitor pays by M-Pesa or USDT04Signed webhook is delivered05Payment recorded in WordPress
WordPress payment button flow: the visitor clicks the payment block, your site creates a checkout session server-side, the visitor pays by M-Pesa or stablecoin, a signed webhook is delivered, and the payment is recorded in your WordPress admin.

Setup

From install to a live button in seven steps

  1. 01

    Create a merchant account and issue test keys

    Sign up on the merchant portal and generate a test key pair. You can build and preview the whole page before a real shilling is involved.

  2. 02

    Install and activate the plugin

    Install from the plugin zip under Plugins, Add New, Upload Plugin. It adds a settings screen, a block and a shortcode. It does not touch your theme.

  3. 03

    Paste your keys under Settings, E-Sarif Checkout

    Enter the secret and publishable keys and pick your settlement currency. The secret key stays in your WordPress options and is used only for server-side calls.

  4. 04

    Register the webhook endpoint

    Copy the webhook URL from the settings screen into your merchant portal. Payments are recorded when that webhook arrives, so a site without it will take money and show you nothing.

  5. 05

    Drop a payment block into a page

    In the block editor, add the E-Sarif Payment block and set the amount, the currency, the button label and whether the giver can choose their own amount. Publish and the button is live.

  6. 06

    Or use the shortcode in a classic theme

    If you are not on the block editor, the same button is available as a shortcode you can place in a page, a post, a widget or a page-builder text module.

  7. 07

    Test the button, then go live

    Pay yourself with the test keys, check the payment appears in your WordPress payments list, then swap in the live pair and do it once more for real with a small amount.

  • Secret key (esk_test_...)
  • Publishable key (epk_test_...)
  • Settlement currency: USDT or KES
  • Webhook URL to copy into the merchant portal
  • Default button label
  • Recorded payments: reference, amount, method, status
Screenshot placeholder: the E-Sarif Checkout settings screen in WordPress, showing the key fields, the settlement currency, the webhook URL to register, and the list of recorded payments below it.

Shortcode

Placing a button outside the block editor

Classic themes and page builders get the same button through a shortcode. Every attribute has a sensible default, so the shortest useful version is just the amount and the currency.

WordPress shortcode
[esarif_payment
  amount="2500"
  currency="KES"
  label="Pay deposit"
  reference="site-visit-deposit"
  allow_custom_amount="false"
]

Supported features

Feature support on WordPress

E-Sarif Checkout feature support on WordPress
FeatureStatus on WordPress
M-Pesa STK pushSupported on every button.
USDT and USDCSupported on Tron, Solana, Base, BNB Chain, Ethereum, Polygon, Arbitrum, Optimism and Avalanche, which is how overseas supporters and clients pay you.
Fixed-amount buttonsSupported. Set the amount in the block and the buyer cannot change it.
Buyer-chosen amountSupported, with an optional minimum. This is what most donation and contribution pages need.
Block editor blockSupported, with live preview in the editor.
Shortcode for classic themes and page buildersSupported.
Payment record in the WordPress adminSupported. Confirmed payments are listed with their reference, amount, method and status.
Reference and metadataEach button can carry a reference, so a page-per-campaign setup reconciles cleanly.
Cart, stock, shipping and taxNot supported by design. If you need any of these, use the WooCommerce plugin.
Recurring donations or subscriptionsNot supported. Both payment methods need the payer to approve each payment.
RefundsSupported from the merchant portal, in full or in part, returned the way the money came in.
AvailabilityIn development. Confirm with the team before you build a launch around it.

FAQ

WordPress and E-Sarif, answered

Can I accept M-Pesa on WordPress without WooCommerce?

Yes, and for most sites that is the better choice. If you only need people to pay you an amount, WooCommerce brings a cart, stock, shipping and tax you will never use. The E-Sarif WordPress plugin adds a payment button as a block or a shortcode, and nothing else.

What is the difference between this and the WooCommerce plugin?

The WooCommerce plugin is a payment gateway for a shop: it works with orders, stock and the WooCommerce refund flow. The WordPress plugin is a payment button for a page: it collects an amount with no cart behind it. Both use the same E-Sarif checkout sessions and the same merchant account, so you can run either or both.

Can supporters choose how much to give?

Yes. Turn on the custom-amount option and the payer enters their own figure, with an optional minimum you set. That is the usual configuration for donation and contribution pages.

Where do I see who paid?

Confirmed payments appear in a list inside your WordPress admin with the reference, amount, method and status, and in full detail in your merchant portal. The record is written when the signed webhook arrives, not when the payer is redirected back, so what you see reflects money that actually moved.

Can I take recurring monthly donations?

No. Recurring billing is not supported, because M-Pesa and stablecoin payments both need the payer to approve each payment. A monthly reminder email with a payment link is the practical alternative.

Will it slow my site down?

The button itself is light and the checkout is hosted by E-Sarif, so the heavy part of the payment flow does not run on your server or in your theme. Nothing is loaded on pages that do not contain a payment block.

Can I use it with Elementor, Divi or another page builder?

Yes, through the shortcode. Drop it into any text or shortcode module. The block is for the built-in block editor; the shortcode works everywhere else.

Do I need an SSL certificate?

Yes, and you should have one regardless. Payment flows and webhook delivery should both run over HTTPS, and modern browsers will warn your visitors if they do not.

Can one site have several different payment buttons?

Yes. Use as many blocks or shortcodes as you like, each with its own amount and reference, so a page-per-campaign or page-per-service setup reconciles without guesswork.

Other integrations

Back to the E-Sarif Checkout overview

One button.
Two ways to pay.

Create a merchant account, install the plugin with test keys, and put a working payment button on a page today.