agentsclimarketplace

Mom factura webhooks

Skill ithustle/momenu-skills/skills/mom-factura-webhooks

Agent Skills for Mom Factura Payment API — Angolan payments (MCX, E-kwanza, Bank Reference) for LLM agents

Install
npx -y skills add ithustle/momenu-skills --skill mom-factura-webhooks

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Implement webhook-based payment confirmation for Mom Factura API. Webhooks work for Bank Reference, sending two sequential events (payment.confirmed + invoice.created). Use when building payment confirmation flows, receiving webhook notifications, or handling order state transitions from OPEN to PAID. Status polling endpoint available as fallback.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.7 KB, as published. Nobody here has run it

Mom Factura Webhooks & Status

Receive payment confirmations for deferred Bank Reference payments via webhook with two sequential events. Status polling endpoint available as fallback.

Base URL: https://api.momenu.online Auth: x-api-key header required on all requests.

How It Works

  1. Login at momenu.toquemedia.net
  2. Go to the Desenvolvedores menu
  3. Add your webhook URL
  4. Save the configuration

When a payment is confirmed, the API sends two sequential webhook events to your URL:

  1. payment.confirmed — Sent immediately after the order status is updated to PAID (before invoice generation). Use this to update the order state in your system.
  2. invoice.created — Sent after the invoice PDF is generated and uploaded. Includes the invoiceUrl field with the download link.

Non-paid events (cancelled, failed, error) are sent as a single event without the event field, maintaining backward compatibility.

Webhook Payloads

Event 1: payment.confirmed

{
  "event": "payment.confirmed",
  "merchantTransactionId": "abc123...",
  "ekwanzaTransactionId": "EKZ456...",
  "operationStatus": "1",
  "operationData": { ... }
}

Event 2: invoice.created

{
  "event": "invoice.created",
  "merchantTransactionId": "abc123...",
  "ekwanzaTransactionId": "EKZ456...",
  "operationStatus": "1",
  "operationData": { ... },
  "invoiceUrl": "https://invoice-momenu.toquemedia.net/invoices/..."
}

Non-paid events (no event field)

{
  "merchantTransactionId": "abc123...",
  "ekwanzaTransactionId": "EKZ456...",
  "operationStatus": "3",
  "operationData": { ... }
}

operationStatus values: "1" Paid · "3" Cancelled/Expired · "4" Failed/Refused · "5" Error

Webhook Server Example - Node.js / Express

const express = require("express");
const app = express();

app.use(express.json());

app.post("/webhook/meu-webhook", (req, res) => {
  const { event, merchantTransactionId, operationStatus, invoiceUrl } = req.body;

  switch (event) {
    case "payment.confirmed":
      console.log("Payment confirmed:", merchantTransactionId);
      // Update order state in your system
      break;

    case "invoice.created":
      console.log("Invoice ready:", invoiceUrl);
      // Save invoice URL, send to customer
      break;

    default:
      // Events without "event" field (cancelled, failed, error)
      if (["3", "4", "5"].includes(operationStatus)) {
        console.log("Payment failed:", operationStatus);
      }
  }

  res.status(200).json({ received: true });
});

app.listen(3000);

Webhook Server Example - Python / Flask

from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route("/webhook/meu-webhook", methods=["POST"])
def momenu_webhook():
    data = request.json
    event = data.get("event")
    transaction_id = data.get("merchantTransactionId")
    status = data.get("operationStatus")

    if event == "payment.confirmed":
        print(f"Payment confirmed: {transaction_id}")
        # Update order state

    elif event == "invoice.created":
        invoice_url = data.get("invoiceUrl")
        print(f"Invoice ready: {invoice_url}")
        # Save invoice URL

    elif status in ["3", "4", "5"]:
        print(f"Payment failed: {status}")

    return jsonify({"received": True}), 200

Fallback: Status Polling

If webhook delivery fails, use the status endpoint as fallback:

Reference: GET /api/payment/reference/status/:operationId

When paid, it returns invoiceUrl.

async function checkReferenceStatus(operationId) {
  const response = await fetch(
    `https://api.momenu.online/api/payment/reference/status/${operationId}`,
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );

  const data = await response.json();

  if (data.payment?.status === "paid") {
    console.log("Paid! Invoice:", data.invoiceUrl);
  }

  return data;
}

Notes

  • Webhook works for Bank Reference
  • Webhook delivery is fire-and-forget (no retries) — implement the status endpoint as fallback
  • Your webhook endpoint must return HTTP 2xx to acknowledge receipt
  • MCX payments are immediate and do not use webhooks or polling
  • Rate limiting: 100 req/min general, minimum 30s interval for Reference polling

Gives 0 of the 12 instructions most apis services skills give

Counted across 424 of the 426 authors here whose files we hold, read 2026-08-06

  • use plural nouns for resource namesin 41 of 424, across 32 files
  • use cursor-based pagination for large datasetsin 35 of 424, across 20 files
  • include rate limit headers in responsesin 25 of 424, across 13 files
  • Use kebab-case for multi-word resourcesin 23 of 424, across 13 files
  • version APIs in the URL pathin 19 of 424, across 9 files
  • use semantic HTTP status codesin 18 of 424, across 8 files
  • verify webhook signaturesin 18 of 424, across 11 files
  • use query parameters for filteringin 17 of 424, across 6 files
  • use async database operationsin 14 of 424, across 7 files
  • wrap successful responses in a data fieldin 13 of 424, across 3 files
  • prefix sorting parameters with a hyphen for descending orderin 13 of 424, across 3 files
  • set appropriate HTTP status codesin 13 of 424, across 6 files

Said here and by no other author read

  • handle the payment confirmed event before invoice generation
  • update the order state upon receiving payment confirmed
  • handle the invoice created event after pdf generation
  • save the invoice url when receiving invoice created
  • check operation status if event field is missing
  • use the status polling endpoint if webhook delivery fails

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.