Certifier (POST certify)
Certifier une facture FV/FT/EV/ET
POST
Essayer dans le bac à sableGénérez des données et envoyez une vraie requête — mode test.
/v1/mcf/{nim}/certifyCorps
| Champ | Type | Détail |
|---|---|---|
invoiceNumber | string | n° de facture |
invoiceType | enum | FV FT EV ET |
priceMode | enum | TTC (défaut) ou HT |
operatorId, operatorName | string | opérateur/caissier |
isf | string | identifiant système fiscal |
customer | object | clientType (CC/PP/PM/PC), ifu, name… |
items[] | array | name, taxGroup (B=18%), taxRate, unitPrice, quantity, amountTtc, specificTax?, specificTaxRate? |
payments[] | array | method (E/V/C/M/B/A), amount |
Taxe spécifique (TS). Pour une ligne avec droit d'accise, ajoutez specificTax (montant TS total de la ligne, en HT)
et specificTaxRate (TS par unité, en XOF — pas un %). L'invariant machine doit tomber juste :
amountTtc = unitPrice × quantity + specificTax × (1 + taxRate/100) et specificTaxRate × quantity = specificTax.
Si l'invariant n'est pas respecté (ou non entier), la plateforme replie automatiquement la TS
dans le prix (l'article certifie toujours à son amountTtc, sans ligne TS distincte) — vos factures
ne sont donc jamais rejetées pour une TS mal formée.
curl -X POST "https://api.mcf.avepay.net/v1/mcf/EL02000015-1/certify" \
-H "Authorization: Bearer $AVEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoiceNumber": "FV-2026-0001",
"invoiceType": "FV",
"priceMode": "TTC",
"operatorId": "1",
"operatorName": "Awa",
"isf": "1",
"customer": { "clientType": "PP", "name": "Client Comptant" },
"items": [
{
"name": "Riz 25kg",
"itemType": "LOCBIE",
"taxGroup": "B",
"taxRate": 18,
"amountTtc": 15000,
"unitPrice": 15000,
"quantity": 1
}
],
"payments": [{ "method": "E", "amount": 15000 }]
}'{
"codeSecef": "TESTFACTNMXIXSLIZ5Y6WWNL",
"invoiceType": "FV",
"totalTtc": 15000,
"nim": "EL02000015-1",
"ifu": "00084440Y",
"dateTime": "20260613132926",
"qrContent": "BFSECEF01;EL02000015;TESTFACT...;00084440Y;20260613132926",
"taxDetails": [
{
"group": "B",
"label": "TVA 18% [B]",
"ht": 12712,
"tva": 2288,
"ttc": 15000
}
],
"tc": 409,
"fvc": 291,
"frc": 0
}