TeePayDocs
Plugins

Plugins overview

Accept TeePay mobile money in WooCommerce and WHMCS without writing code.

TeePay's plugins add mobile money to the platform you already run. Customers pay with M-Pesa, Airtel Money, Mixx by Yas or HaloPesa on TeePay's hosted checkout, and the plugin marks the order or invoice paid only after TeePay has verified and ledger-posted the payment.

Source code

Every plugin is open source. Read the code, report issues and follow releases on GitHub.

What the plugins have in common

WooCommerceWHMCS
Payment flowHosted checkout, or mobile money prompt (optional)Hosted checkout
Confirms payment withSigned webhook, then an authenticated status readSigned webhook, then an authenticated status read
Amount and currency checkOrder total and currency, exactlyInvoice balance and currency, exactly
RefundsNot available through the API yetNot available through the API yet
LicenseGPL-2.0-or-laterMIT

Both bundle a small TeePay API client, so there is nothing extra to install on your server.

Before you install

Create an API key

In the dashboard open Developers and create a key with the collection:create and collection:read scopes. Live keys start with tp_live_. See Authentication.

Create the webhook signing secret

Open Developers → Webhooks and create the signing secret (whsec_…). Each environment has its own secret.

Set up a payment profile

Open Payment profiles and set the webhook URL and return URL the plugin shows you. TeePay takes these URLs only from the dashboard, never from an API request, so a leaked key cannot redirect your customers or your webhooks. Running more than one store? Give each its own profile and enter the profile ID in the plugin.

How a payment is confirmed

The plugins never trust the browser. A customer returning from the checkout, or a link with ?status=paid in it, does not mark anything paid. Instead:

  1. TeePay sends a signed webhook. The plugin checks X-TeePay-Signature against your secret and rejects requests more than five minutes old.
  2. The plugin reads the checkout session with your secret key (GET /v1/checkout-sessions/{id}).
  3. Only a session with status paid, a payment reference, and an amount and currency equal to the order or invoice is recorded. Anything else is left unpaid; a mismatch is flagged for you to review.

The customer's return and a periodic check trigger the same read, so a missed webhook only delays confirmation.

Test in live with a small amount

Sandbox keys (tp_test_) check your keys and settings, but checkout sessions and mobile money run in the live environment only. Before launch, make one real payment with a small amount and confirm the order or invoice is marked paid. See Environments.

NextWooCommerceInstall and configure TeePay for WooCommerce.

On this page