Avoir (POST credit-note)
Émettre un avoir FA/EA
POST
Essayer dans le bac à sableGénérez des données et envoyez une vraie requête — mode test.
/v1/mcf/{nim}/credit-noteMêmes champs que certify, plus :
| Champ | Détail |
|---|---|
invoiceType | FA ou EA |
creditNoteNature | COR (défaut) / RAN / RAM / RRR |
creditNoteRef | {NIM}-{COUNTER} (ex. EL02000015-1-291) ou RRR |
creditNoteRef doit matcher ^[A-Z]{2}\d+-\d+-\d+$ ou RRR. Le {COUNTER} est le
FVC de la facture d'origine (renvoyé dans sa réponse).
curl -X POST "https://api-mcf-orchestrator.toolsite.io/v1/mcf/EL02000015-1/credit-note" \
-H "Authorization: Bearer $AVEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"invoiceNumber": "FA-2026-0001",
"invoiceType": "FA",
"creditNoteNature": "COR",
"creditNoteRef": "EL02000015-1-291",
"items": [
{ "name": "Riz 25kg", "taxGroup": "B", "amountTtc": 1000, "quantity": 1 }
],
"payments": [{ "method": "E", "amount": 1000 }]
}'{
"codeSecef": "TESTFACTTPIBQ7NCFWC5U5Y7",
"invoiceType": "FA",
"totalTtc": 1000,
"qrContent": "BFSECEF01;...",
"taxDetails": [
{
"group": "B",
"tva": 153,
"ttc": 1000
}
]
}