> For the complete documentation index, see [llms.txt](https://tembo.gitbook.io/tembo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tembo.gitbook.io/tembo/momo-collection-and-payout-api/api-reference/webhook-notification.md).

# Webhook Notification

After the MOMO collection or payout is processed, TemboPlus sends a POST request to your configured `callbackUrl` with the final transaction outcome.

The webhook body contains the same identifiers returned in the initial response, along with an updated `statusCode` value. Possible values for `statusCode` include `PAYMENT_ACCEPTED`, `PAYMENT_REJECTED` and `GENERIC_FAILURE`.

Example:

```json
{
  "statusCode": "PAYMENT_ACCEPTED",
  "transactionId": "ddZFz7rWkIvU",
  "transactionRef": "SAL-2025-09-001",
  "meta": {}
}
```

Values above are examples only; actual `transactionId` and `transactionRef` will vary per request.

#### Webhook Delivery Notes

* TemboPlus will make a POST request to your `callbackUrl` after receiving the final response from the provider.
* Each webhook contains a JSON payload with `statusCode`, `transactionId`, `transactionRef`, and optional `meta` object.
* Webhook delivery is asynchronous; the callback may arrive seconds to hours after the initial API response, depending on the channel.
* Always validate both `transactionId` and `transactionRef` before updating your internal records.
* Your endpoint should return an HTTP 200 OK response upon successful receipt to acknowledge the notification.

### Status Code Behavior

The `statusCode` returned in the initial response can vary significantly depending on the Mobile Network Operator or bank processing the transaction.

**Observed Behaviors (MOMO Collection):**

* **Immediate Response:** Some providers return statuses like `INSUFFICIENT_FUNDS`, `PAYMENT_REJECTED` immediately after collection initiation. They never return `PAYMENT_ACCEPTED` since it must made pending before the user is sent a prompt to authorization the payment.
* **Pending Processing:** Other providers may return `PENDING_ACK` or similar status codes initially, with final confirmation coming later via callback.

**Observed Behaviors (Payouts):**

* **Immediate Acceptance:** Some providers return `PAYMENT_ACCEPTED` immediately upon successful validation.
* **Pending Processing:** Other providers may return `PENDING` or similar status codes initially, with final confirmation coming later via callback.

**Recommendation:** Always implement webhook callback handling and use the Check Transaction Status endpoint to verify final transaction outcomes.
