---
title: "Crée (ou refetch) un PaymentIntent pour payer EN LIGNE le solde dû d'une"
method: POST
path: "/api/v1/portal/invoices/{invoice_id}/pay"
tags: ["client_portal"]
---

# Crée (ou refetch) un PaymentIntent pour payer EN LIGNE le solde dû d'une

`POST /api/v1/portal/invoices/{invoice_id}/pay`

## Request

- Base URL: `https://erp.eyeot.fr/api/v1`
- URL: `https://erp.eyeot.fr/api/v1/api/v1/portal/invoices/{invoice_id}/pay`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Crée (ou refetch) un PaymentIntent pour payer EN LIGNE le solde dû d'une
    facture du client B2B lié, via le compte connecté de l'org émettrice (charge
    directe 0 %). Renvoie le `client_secret` transient au StripePaymentForm.

    Vague 3 MUST « paiement en ligne multi-surfaces » (2026-07-03).

    SÉCURITÉ ARGENT : le montant encaissé (solde dû) est recalculé côté serveur
    dans `invoice_payment_service` — JAMAIS lu depuis le body. Ownership vérifié
    (la facture doit appartenir au Client lié au user) → 404 sinon (on ne
    divulgue pas l'existence d'une facture d'un autre client).

## Response `200`

Succès — payload `{data, meta}` (cf. API-GUIDE §3.1)

## Other responses

- `201`: Ressource créée. ID dans `data.id`.
- `400`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `401`: JWT manquant, expiré ou révoqué.
- `404`: Ressource introuvable (ou cross-tenant — équivalent à hidden).
- `409`: État incohérent (email dupliqué, ressource déjà dans cet état, etc.).
- `422`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `429`: Trop de requêtes. Honorer le header `Retry-After` (secondes).

---

[API](https://skmtc.dev/eyeot/apis/eyeot-erp-api.md) · [All operations](https://skmtc.dev/eyeot/apis/eyeot-erp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eyeot/apis/eyeot-erp-api/revisions/42ab95222a89?raw)
