Skip to main content

Overview

Fingo Pay sends webhook events to your endpoint for asynchronous transaction updates. Each event contains a type, timestamp, and transaction data.

Base Event Structure

All webhook events follow this structure:

Event Types

C2B (M-Pesa Charge) Events

  • transaction.creation_failed - Collections creation failed (business logic error)
  • transaction.succeeded - Customer completed STK Push payment
  • transaction.failed - Payment failed (user cancelled, timeout, or error)

Payout Transaction Events

  • transaction.creation_failed - Payout creation failed (business logic error)
  • transaction.succeeded - Payout completed successfully
  • transaction.failed - Payout failed

Other transaction events

  • transaction.created - Transaction initiated
  • transaction.processing - Transaction being processed
  • transaction.reversed - Transaction reversed/refunded
transaction.* is the webhook namespace used across all transaction categories.

C2B Charge Webhooks

Transaction Succeeded

Sent when the customer successfully completes the STK Push payment.

Transaction Failed (User Cancelled)

Sent when the customer cancels, times out, or the payment fails for any reason.

Transaction Failed (Creation Error)

Sent when the transaction fails during creation (e.g., shortcode not found, account not configured).

B2C Payout Webhooks

Transaction Creation Failed

Sent when payout creation fails due to non-retriable errors like insufficient balance, duplicate transaction, or account not found.
INSUFFICIENT_BALANCE
DUPLICATE_TRANSACTION
ACCOUNT_NOT_FOUND
NO_PAYOUT_ACCOUNT

Transaction Succeeded (Payout)

Sent when the B2C transfer to the customer’s M-Pesa wallet is successful.

Transaction Failed (Payout)

Sent when the M-Pesa B2C transfer fails at the provider level (e.g., invalid phone number, recipient not registered).

Webhook Signature Verification

All webhooks include signature headers for verification. See the Webhooks guide for implementation details.
Always verify webhook signatures before processing events to ensure they originate from Fingo Pay.