🔔 Webhook Events

meCash Webhook Events

meCash supports webhook notifications for key events in your payout and virtual workflows. You can monitor these events in real time via the Webhook Logs section on your Dashboard.

In this section, we'll consider the following:

  1. Managing Webhooks

  2. Event Types

  3. Transaction Details

  4. Webhook Payloads for Virtual accounts, Fiat transactions, and Ramp Payouts (i.e Off-Ramp and Crypto).

Viewing Webhook Events

To view the events in meCash Webhook Logs:

  1. Navigate to the Developers section on your meCash Dashboard.

  2. On the left-side of the screen, click on the Webhook Logs tab.

webhook logs

Each entry includes:

  • Event: The triggered event type (e.g., transaction.success, transaction.failed, customer.created). This tells you what action in meCash initiated the webhook.
  • Response Code: The HTTP status code received from your webhook server. A 200 OK indicates your server successfully processed the webhook, while a 500 Internal Server Error or other error codes point to an issue on your server's side.
  • Response Time: The duration of the response in milliseconds. This helps you monitor the performance of your webhook endpoint; longer times might signal potential bottlenecks.
  • Date Time: The exact timestamp when the event occurred. This is crucial for tracking and debugging purposes.
  • Status: Whether the webhook was successfully sent and delivered. This usually shows "Sent" or "Delivered" if the webhook reached your server.

You can view the summary/details and payload of a specific webhook event.

Webhook Summary

The summary page includes:

  • Type: The webhook event type (e.g., collection.completed).
  • Response Code: The HTTP response code for the event (e.g., 200, 500).
  • Notification URL: The webhook URL configured to receive webhook events. It's essential to confirm this URL is correct and active.
  • Event ID: A unique identifier for the specific webhook event. This ID can be helpful when troubleshooting with meCash support.
  • Sent: This is the date/time the webhook event was sent.
  • Delivered: This is the date/time the webhook event was delivered.
  • Status: The status of the webhook event, not the payload (e.g., "Success", "Failed").

Note: This status is independent of the event payload state.

The Payload tab displays the JSON body of the webhook event. Each event type has a different payload structure, containing detailed information about the event.

Webhook Payload

You can refer to the Webhook Event Payload documentation for specific payload structures.

meCash Event Types

These are the events that meCash will notify you about via the Webhook logs. Each event represents a change in the state of a transaction or virtual account activity.


Collections Events

  • collection.completed
    (FUNDING) – Notifies you when funds have been successfully collected (funding of your merchant account).

  • collection.failed
    (FUNDING) – Informs you that a collection attempt has failed.i.e An attempt to fund the merchant account failed.


Virtual Account Events

  • virtualaccount.completed
    (FUNDING) – Informs you when a virtual account has been successfully funded.

  • virtualaccount.failed
    (FUNDING) – Alerts you if an attempt to fund a virtual account has failed.


Fiat Payout Events

  • payout.completed
    (SEND) – Notifies you when a payout has been successfully completed from your account to an external recipient.

  • payout.failed
    (SEND) – Informs you when a payout attempt has failed.

  • payout.pending
    (SEND) – Alerts you that a payout is currently in progress.


Ramp Payout Events

  • ramp.payout.completed
    (SEND) – Indicates that an off-chain payout transfer has been successfully completed.

  • ramp.payout.failed
    (SEND) – Notifies you that an off-chain payout attempt has failed.

  • ramp.payout.pending
    (SEND) – Indicates that an off-chain payout transfer is pending and being processed.

  • ramp.payout.refund
    (SEND) – Notifies you that a refund has been processed for a previously initiated payout.

ℹ️

These Ramp event types are the same for both categories of the Ramp transaction: Off-Ramp and Crypto.


Transaction States

This explains the different possible statuses of a transaction that you might see within the webhook payload:

StateDescription
COMPLETEDThe transaction was processed successfully
PENDINGThe transaction is still in progress
FAILEDThe transaction could not be processed

Transaction Types

The type and category fields in webhook payloads describe the nature of the transaction and how the funds move across financial networks.

FieldExample ValueDescription
typeSENDDescribes the direction or action of the transaction. Example: sending funds out (e.g., a payout or a ramp payout).
FUNDINGIndicates that a virtual account or wallet is being funded (e.g., deposits or top-ups).
categoryOFF_RAMPIdentifies the transaction as an off-ramp conversion (crypto to fiat, usually a payout to a bank account).
CRYPTOCURRENCYIdentifies the transaction as involving only cryptocurrencies (e.g., crypto-to-crypto transfers).

Summary of Categories

  • OFF_RAMP – Funds are converted from crypto to fiat and paid out to external recipients (like bank transfers in local currency).
  • CRYPTOCURRENCY – Transactions remain entirely within the blockchain (no fiat involvement).

Webhook Payload Format

Here are sample JSON payloads that meCash sends to the Webhook Logs when an event is triggered.

collection.completed

Sent when a merchant's wallet has been successfully funded. This typically happens after a customer payment is settled.

{
"event": "collection.completed",
"data": {
"id": "1232d254-c18d-4ec2-xxxxxxxxxxxxx",
"referenceNumber": "E09B8KMBGL6MC",
"amount": 110,
"type": "FUNDING",
"state": "COMPLETED",
"destination": "NGN wallet",
"source": {
  "bankName": "GTBank Plc",
  "accountName": "JESSICA DOE",
  "accountNumber": "00XXXXXXXXX"
},
"created": "2025-04-17T12:29:11.104451302",
"processed": "2025-04-17T12:29:11.104451302"
}
}
 

Payload Breakdown

Top-Level Fields

FieldTypeDescription
eventstringThe type of event (collection.completed).
dataobjectContains all details of the collection.

Collection Data (data object)

FieldTypeDescription
idstringUnique identifier for the collection event.
referenceNumberstringInternal reference for the collection.
amountnumberThe gross amount collected before fees.
feenumberThe transaction fee deducted from the gross amount.
netAmountnumberThe net amount credited to the merchant's wallet (amount - fee).
currencystringThe currency of the collection (e.g., "NGN").
statestringThe final state of the collection (COMPLETED).
source.typestringThe origin of the funds (e.g., "CUSTOMER_PAYMENT").
source.idstringThe unique ID of the original transaction that sourced the funds.
merchant.idstringThe unique identifier for the merchant.
merchant.walletstringThe specific merchant wallet that was funded.
createdstringISO 8601 timestamp of when the collection was initiated.
processedstringISO 8601 timestamp of when the wallet was successfully funded.