WooCommerce integration

Accept M-Pesa and USDT on WooCommerce

The E-Sarif Checkout plugin adds a second and third way to pay to your WooCommerce store: an M-Pesa prompt on the buyer phone, and USDT or USDC on Tron, Solana, Base and 6 more networks. Orders are marked paid by a signed webhook, and you can refund from the WooCommerce admin like any other gateway.

  • Early access
  • WordPress stores running WooCommerce
  • No code required

Why it matters

The Kenyan WooCommerce checkout problem

A WooCommerce store selling into Kenya usually ends up with two bad options. The first is a card gateway, which excludes the large share of buyers who do not use a card online. The second is a paybill or till number pasted into the order notes, which works right up until you are matching M-Pesa SMS messages against orders by hand at eleven at night, guessing which of two customers sent the 2,400 shillings.

The manual route also breaks the parts of WooCommerce you rely on. Orders sit in Pending, stock is not released, the customer never gets a processing email, and your reports are wrong. Nothing downstream can be automated because the store does not know the payment happened.

E-Sarif Checkout closes that loop. The buyer approves the payment on their phone, E-Sarif confirms it, and a signed webhook tells WooCommerce the order is paid, so stock, emails and reports behave exactly as they would with a card gateway. The stablecoin method sits on the same page for buyers paying from outside Kenya or holding USDT.

WooCommerce order lifecycle with E-Sarif Checkout: the shopper places the order, the plugin creates a checkout session server-side, the shopper pays by M-Pesa or stablecoin, E-Sarif sends a signed webhook, and the plugin moves the order to Processing.01Shopper places order in WooCommerce02Plugin creates a session server-side03Shopper pays by M-Pesa or USDT04Signed webhook hits your store05Order moves to Processing
WooCommerce order lifecycle with E-Sarif Checkout: the shopper places the order, the plugin creates a checkout session server-side, the shopper pays by M-Pesa or stablecoin, E-Sarif sends a signed webhook, and the plugin moves the order to Processing.

Setup

Install and configure in eight steps

None of this requires code. Budget about twenty minutes, most of it spent on the test order you should not skip.

  1. 01

    Create your E-Sarif merchant account

    Sign up on the merchant portal and generate an API key pair. You get a secret key beginning esk_ and a publishable key beginning epk_. Start with the test pair; the live pair can wait until the flow works.

  2. 02

    Install the E-Sarif Checkout plugin

    Upload the plugin zip under Plugins, Add New, Upload Plugin, then activate it. It registers itself as a WooCommerce payment gateway and adds its own webhook endpoint.

  3. 03

    Open WooCommerce, Settings, Payments

    E-Sarif Checkout appears in the list of gateways alongside your existing methods. Toggle it on and click Manage to open its settings.

  4. 04

    Paste your keys and leave test mode on

    Enter the secret and publishable keys. The secret key is stored server-side and is never rendered into the page your buyer loads. Keep the test-mode toggle enabled for now.

  5. 05

    Choose the payment methods and settlement currency

    Decide whether the gateway offers M-Pesa, stablecoins or both, and set the settlement currency to USDT or KES. You can also restrict which networks are shown to buyers.

  6. 06

    Register the webhook endpoint

    Copy the webhook URL the plugin displays into your merchant portal. This is what marks orders paid, so do not skip it. Order status is never changed on the return redirect alone.

  7. 07

    Place a test order end to end

    Buy something cheap from your own storefront with the test keys active. A test payment settles after a few seconds without a real STK push, so you can watch the order move to Processing.

  8. 08

    Swap in the live keys

    Turn test mode off, paste the esk_live_ and epk_live_ pair, and place one small real order. Confirm the webhook arrived and that the order status changed before you announce the new payment method.

  • Enable E-Sarif Checkout
  • Secret key (esk_test_...)
  • Publishable key (epk_test_...)
  • Payment methods: M-Pesa, stablecoins
  • Settlement currency: USDT or KES
  • Test mode: on
  • Webhook URL to copy into the merchant portal
Screenshot placeholder: the E-Sarif Checkout settings screen inside the WooCommerce payments tab, showing the key fields, the payment-method toggles, the settlement currency selector and the test-mode switch.

Supported features

What the WooCommerce plugin does and does not do

The bottom two rows matter as much as the rest. A payment method that quietly fails at renewal time is worse than one you knew about in advance.

E-Sarif Checkout feature support on WooCommerce
FeatureStatus on WooCommerce
M-Pesa STK pushSupported. The buyer enters a phone number on the E-Sarif checkout page and approves the prompt.
USDT and USDCSupported on Tron, Solana, Base, BNB Chain, Ethereum, Polygon, Arbitrum, Optimism and Avalanche.
Redirect checkoutSupported. The buyer leaves for the E-Sarif hosted page and returns to your order-received page.
Embedded checkoutSupported. The session can be opened in an iframe on your own checkout page instead.
Order status automationOrders move to Processing on a verified checkout.session.completed webhook, and to Failed or Cancelled when the session expires.
Refunds from the WooCommerce adminSupported, full and partial. The refund is created against the original session and returned over M-Pesa B2C or on-chain.
Idempotent retriesThe plugin derives its idempotency key from the order id and attempt number, so a buyer double-clicking Pay cannot create two charges.
Test modeSupported, with a separate key pair. Test payments confirm automatically after a few seconds.
Multi-currency pricingSell in KES, USD, USDT or USDC. The buyer sees the stablecoin equivalent calculated at session creation.
WooCommerce Subscriptions and recurring billingNot supported. Every payment is an individual checkout session that the buyer approves.
Saved cards or stored payment methodsNot applicable. There is nothing to store: M-Pesa is approved on the handset and stablecoin payments come from the buyer wallet.

Going live

Four things worth checking on a real store

These are the issues that cost merchants their first live weekend. All four take minutes to verify and are invisible until they bite.

How the underlying API behaves

FAQ

WooCommerce and E-Sarif, answered

Does the E-Sarif WooCommerce plugin support M-Pesa?

Yes. M-Pesa is one of the two payment methods the gateway offers. The buyer enters their phone number on the E-Sarif checkout page, approves the STK push prompt on their handset, and the order is marked paid in WooCommerce when the confirmation webhook arrives.

Do my customers need a crypto wallet?

Only if they choose to pay in stablecoin. A buyer paying by M-Pesa never sees a wallet, an address or a network name. The two methods sit side by side on the same checkout page and the buyer picks one.

Can I keep my existing WooCommerce payment gateways?

Yes. E-Sarif Checkout registers as an additional gateway. Your current methods stay exactly where they are and the buyer chooses at checkout.

Will my WooCommerce orders be marked paid automatically?

Yes, through a signed webhook. The plugin verifies the HMAC signature, rejects deliveries older than five minutes, and deduplicates on the event id, so a retried delivery cannot mark the same order paid twice. The buyer returning to your site is treated as a UX convenience, never as proof of payment.

How do refunds work?

Refund from the WooCommerce order screen as you would with any gateway. The plugin creates the refund against the original checkout session, in full or in part, and E-Sarif returns the money the way it arrived. Refunds above your account threshold are held for approval before they move.

My store prices in KES. Can I still settle in USDT?

Yes. Pricing currency and settlement currency are set independently. A KES price list can settle to a USDT balance, and E-Sarif does the conversion at session creation so the buyer sees an exact amount.

Does it work with WooCommerce Subscriptions?

No. Recurring billing is not supported today. Each payment is a single checkout session the buyer approves, which rules out unattended renewals. If you need recurring billing, use a payment link per invoice cycle or talk to the team first.

Is my secret API key exposed in the page source?

No. The plugin creates every checkout session from your server using the secret key. Only the publishable key can appear in the browser, and it can do nothing except open a session and read its own status.

What happens if a customer abandons the payment?

The session expires, by default after thirty minutes, and the order is left unpaid rather than being marked complete. The buyer can retry from the same order; the plugin creates a fresh session with a new idempotency key.

Other integrations

Back to the E-Sarif Checkout overview

Add M-Pesa to WooCommerce
this afternoon.

Create a merchant account, grab your test keys, and run a full order through the plugin before you take a real payment.