meta { name: 06 Mark paid type: http seq: 6 } post { url: {{baseUrl}}/api/v1/invoices/{{invoiceId}}/mark-paid body: none auth: inherit } tests { test("200 OK", function () { expect(res.getStatus()).to.equal(200); }); test("status = paid", function () { expect(res.getBody().data.status).to.equal("paid"); }); test("paidAt non null", function () { expect(res.getBody().data.paidAt).to.not.be.null; }); test("rubisEarned bumpé à 2 (1 saisie + 1 encaissement)", function () { expect(res.getBody().data.rubisEarned).to.be.at.least(2); }); } docs { POST /api/v1/invoices/:id/mark-paid Marque la facture encaissée : - `status` → `paid` - `paidAt` → maintenant - `rubisEarned` → +1 (bonus encaissement) - `organizations.rubis_count` → +1 (compteur agrégé pour le dashboard) **Idempotent** : si la facture est déjà payée, retourne l'état courant sans bumper. Vérifier ensuite via "Organizations → 01 Get my org" que `rubisCount` a augmenté. }