skills/mom-factura-webhooks/SKILL.md
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.
npx skillsauth add ithustle/momenu-skills mom-factura-webhooksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
When a payment is confirmed, the API sends two sequential webhook events to your URL:
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.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.
{
"event": "payment.confirmed",
"merchantTransactionId": "abc123...",
"ekwanzaTransactionId": "EKZ456...",
"operationStatus": "1",
"operationData": { ... }
}
{
"event": "invoice.created",
"merchantTransactionId": "abc123...",
"ekwanzaTransactionId": "EKZ456...",
"operationStatus": "1",
"operationData": { ... },
"invoiceUrl": "https://invoice-momenu.toquemedia.net/invoices/..."
}
event field){
"merchantTransactionId": "abc123...",
"ekwanzaTransactionId": "EKZ456...",
"operationStatus": "3",
"operationData": { ... }
}
operationStatus values: "1" Paid · "3" Cancelled/Expired · "4" Failed/Refused · "5" Error
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);
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
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;
}
development
Test and debug Mom Factura Payment API integrations using QA environment and payment simulation. Use when setting up test environments, simulating payment outcomes (success, failure, timeout), debugging API errors, or validating integration before production.
development
Integrate Mom Factura Payment API for Angolan payment methods (Multicaixa Express, Bank Reference). Use when implementing checkout flows, processing payments, generating SAFT-AO compliant invoices, or handling product-based billing with IVA tax.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.