Skip to content

Annuler un paiement, changement d'offre sans double paiement (0.7.0) - #14

Merged
JIV-DLS merged 1 commit into
mainfrom
feat/annuler-un-paiement
Nov 16, 2026
Merged

JIV-DLS merged 1 commit into
mainfrom
feat/annuler-un-paiement

Conversation

@JIV-DLS

@JIV-DLS JIV-DLS commented Nov 16, 2026

Copy link
Copy Markdown
Member

Nouvelle route de l'API POST /v1/payments/{id}/cancel.

  • cancel_payment(id) (clients sync et async) : rend le paiement annulé (expired, checkout_url nul, canceled_at, cancel_reason). Identifiant vide refusé sans appel, encodé comme get_payment.
  • Payment / EventPayment : reason (avis payment.expired : canceled ou timeout, absent dans un vieil avis).
  • payment_already_completed non rejouable ; payment_in_progress reste rejouable.
  • Routes toutes faites : POST /payments/{id}/cancel (FastAPI, Flask, Django testés) ; sur reference_conflict, l'ancien essai est relu par sa référence et annulé avant l'essai suivant. Payé ou demande en cours : aucun second paiement. 404 à l'annulation (serveur qui ne l'a pas encore) : essai suivant comme avant.
  • Contrat v1 à 31 cas, query_includes vérifié.
  • Documentation (README, AGENTS.md, llms.txt, CHANGELOG).

…0.7.0)

cancel_payment(id) (POST /v1/payments/{id}/cancel), sync et async ; Payment.canceled_at,
cancel_reason, reason ; EventPayment.reason (payment.expired : canceled ou timeout).
Routes toutes faites : POST /payments/{id}/cancel ; sur reference_conflict, l'ancien essai est
relu puis annulé avant l'essai suivant (aucun second paiement si payment_in_progress ou
payment_already_completed ; 404 à l'annulation : essai suivant comme avant). Contrat v1 : 31 cas.
@JIV-DLS
JIV-DLS merged commit 41ec384 into main Nov 16, 2026
2 checks passed
@JIV-DLS
JIV-DLS deleted the feat/annuler-un-paiement branch November 16, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant