## Requête ```http GET /v1/invoices Authorization: Bearer kh_live_xxxx ``` ### Paramètres de query | Paramètre | Type | Description | |-----------|------|-------------| | `status` | string | Filtre par statut `Order` (seul filtre implémenté) | | `page` | integer | Pagination Laravel | ## Réponse ```json { "success": true, "data": [ { "id": 14, "uuid": "192b4bd5-76b7-44aa-b323-2801115adaf5", "user_id": 2, "order_number": "KH-AWROJCRIZE", "status": "payment_required", "checkout_mode": "auto", "order_type": "standalone_domain", "billing_period": "annual", "total_amount": "3705.00", "discount_amount": "0.00", "original_amount": "3705.00", "payment_method": "notchpay", "created_at": "2026-04-11T11:41:02.000000Z", "updated_at": "2026-04-11T11:41:02.000000Z" } ], "meta": { "total": 9, "per_page": 20, "current_page": 1 } } ``` ## Télécharger une facture PDF ```http GET /v1/invoices/{order_uuid}/pdf ``` Retourne le PDF uniquement si la commande est en statut `active` ou `payment_confirmed`. Sinon, l’API renvoie `422` avec `error.code = invalid_state`. ```php $pdf = $client->request('get', "invoices/{$invoiceId}/pdf"); // Sauvegarder le PDF file_put_contents("facture-{$invoiceId}.pdf", $pdf); ``` ## Permissions requises `invoices:read`