skills/mom-factura-payments/SKILL.md
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.
npx skillsauth add ithustle/momenu-skills mom-factura-paymentsInstall 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.
Process payments for Angolan payment methods with automatic SAFT-AO invoice generation.
Base URL: https://api.momenu.online
All requests require the x-api-key header.
Content-Type: application/json
x-api-key: <MERCHANT_API_KEY>
POST /api/payment/mcx
Immediate payment. Creates order as PAID and generates invoice on success.
Required body:
paymentInfo.amount (number) - KwanzaspaymentInfo.phoneNumber (string) - Format: 244XXXXXXXXXinstantWithdraw (boolean) - Must be true. Auto-payout (amount minus 2%) to the merchant's verified bank account on confirmation. See Instant Withdrawal.Optional body:
products (array) - Items for detailed invoiceproducts[].id (string), products[].productName (string), products[].productPrice (number), products[].productQuantity (number)products[].iva (number) - IVA rate 0-14, default 14customer (object) - name (string), nif (string), phone (string)simulateResult (string) - QA only: success, insufficient_balance, timeout, rejected, invalid_numberExample body:
{
"paymentInfo": { "amount": 5000, "phoneNumber": "244923456789" },
"instantWithdraw": true
}
Success (200):
{
"success": true,
"transactionId": "abc123...",
"invoiceUrl": "https://invoice-momenu.toquemedia.net/invoices/..."
}
POST /api/payment/reference
Generates bank reference. Client pays via ATM or Internet Banking.
Required: paymentInfo.amount, instantWithdraw: true (see Instant Withdrawal)
Optional: products, customer (same as MCX)
Success (200):
{
"success": true,
"operationId": "op-123...",
"referenceNumber": "123456789",
"entity": "12345",
"dueDate": "2024-01-20"
}
If both paymentInfo.amount and products are provided, they must match:
total = SUM(productPrice * productQuantity) for all productsAMOUNT_MISMATCHAMOUNT_MISMATCHDeferred Bank Reference payments are confirmed via webhook. Configure the webhook URL in your apiConfigs document.
When a payment is confirmed, the API sends two sequential events:
Event 1: payment.confirmed — Sent immediately after order status is updated to PAID:
{
"event": "payment.confirmed",
"merchantTransactionId": "abc123...",
"ekwanzaTransactionId": "EKZ456...",
"operationStatus": "1",
"operationData": { ... }
}
Event 2: invoice.created — Sent after invoice PDF is generated and uploaded:
{
"event": "invoice.created",
"merchantTransactionId": "abc123...",
"ekwanzaTransactionId": "EKZ456...",
"operationStatus": "1",
"operationData": { ... },
"invoiceUrl": "https://invoice-momenu.toquemedia.net/invoices/..."
}
Non-paid events (operationStatus 3, 4, 5) are sent without the event field for backward compatibility.
operationStatus values: "1" Paid · "3" Cancelled/Expired · "4" Failed/Refused · "5" Error
Fallback (status endpoint):
Reference: GET /api/payment/reference/status/:operationId - Returns payment.status
When paid, both return invoiceUrl.
instantWithdraw is required and must be true on /api/payment/mcx and /api/payment/reference. The payment value — minus the 2% fee — is transferred automatically (via KWiK) to the merchant's verified bank account as soon as the payment is confirmed.
/api/payment/mcx) and Bank Reference (/api/payment/reference).⚠️ Required (since 2026-06-22): requests to
/api/payment/mcxand/api/payment/referencethat omitinstantWithdraw(or sendfalse) are rejected withINSTANT_WITHDRAW_REQUIRED(HTTP 400). Always send"instantWithdraw": true.
| Code | Description | |------|-------------| | MISSING_API_KEY | x-api-key header missing | | INVALID_API_KEY | Key invalid or inactive | | DOMAIN_NOT_ALLOWED | Origin not registered | | INVALID_AMOUNT | Invalid amount | | AMOUNT_MISMATCH | amount != SUM(products) | | INSTANT_WITHDRAW_REQUIRED | instantWithdraw required and must be true (MCX/Reference) | | MISSING_PHONE | Phone required (MCX) | | MISSING_RESTAURANT_ID | Merchant not identified | | RATE_LIMIT_EXCEEDED | 100 req/min exceeded | | PAYMENT_RATE_LIMIT_EXCEEDED | 20 payment req/min exceeded | | INTERNAL_ERROR | Server error |
Error format: { "success": false, "error": "message", "code": "ERROR_CODE" }
2% processing fee on all payments: feeAmount = totalAmount * 0.02
invoiceUrldevelopment
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.
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
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.