VunaPOS

VunaPOS

M-Pesa Integration

Use integrated M-Pesa checkout when your site can verify the provider's payment before completing the sale. A manually configured payment method called M-Pesa is not automatically an STK/C2B integration.

Before using the integration

Ask the administrator to configure the supported payment connector, its gateway account, company/currency and provider credentials/callbacks. Current deployments use Vuna Payments; older configuration and some messages use the name navari_ke_payments. The connector must provide the site's payment-request and C2B-register functionality.

Link the appropriate Payment Gateway Account on the relevant payment row in the POS Profile. A company ledger account on Mode of Payment is also required. Test provider confirmation before giving cashiers access.

Without a connector you can still record a manual M-Pesa payment according to your business's verification procedure, but VunaPOS cannot send STK prompts or search provider transactions for that manual row.

Collect an STK payment

  1. Open checkout and select the gateway-linked M-Pesa payment method.
  2. Allocate the intended amount to that payment method. Check the total before sending a prompt.
  3. Open STK Push, confirm the customer's phone number and select Send STK.
  4. Ask the customer to approve the prompt on their phone.
  5. Wait for the payment status to update. Use the status-check action if it remains pending.
  6. Use the verified payment in checkout, then complete the sale.

Sending the prompt is not proof of payment. A pending, failed or expired request must not be recorded as a successful gateway payment. Keep the same checkout open while checking a delayed result; do not send another prompt just because a response is slow.

The customer-facing reference uses the available invoice/order reference, rather than a retry key. Where no document reference is available, a VUNAPOS label may be used.

Use an existing C2B payment

  1. Select C2B Payment in the gateway dialog.
  2. Search for the provider transaction using the available phone/reference information.
  3. Confirm that the transaction, amount and currency match the customer and this sale.
  4. Select/attach the matching payment and use it in checkout.
  5. Complete the sale after successful verification.

A transaction already consumed, reconciled or reserved for another checkout cannot simply be attached again. A match in search is not permission to use somebody else's payment.

If the customer paid but checkout failed

Check the payment status and the invoice/order result before taking more money. Keep the transaction reference and ask the cashier/accounts lead to investigate an already-used or unavailable payment. Cancelling a payment selection or allowing it to expire is not a refund from the provider.

For sale checkout, the verified reference is attached to the invoice payment. Receiving money through the separate Payments page creates an ERPNext Payment Entry; see Receiving and Reconciling Payments.

[Video: Sending an STK prompt, waiting for provider confirmation and completing checkout without sending a second prompt]

[Screenshot: C2B lookup showing a matching amount, transaction reference and payment status]

Last updated 1 month ago
Was this helpful?
Thanks!