Skip to content

feat(stripe): enrich transaction with subscriptionUuid + refactor billing

zakariae yahya a demandé de fusionner feature/stripe-subscription-uuid vers develop

PaymentServiceClient

Replaced InvoiceDTO with InvoiceRequestDTO for invoice creation/updates Fixed invoice update: POST to /api/payment/invoices/by-gateway/{id} (instead of PUT) Simplified RestTemplate calls (direct payload without typed HttpEntity)

StripeWebhookServiceImpl

Uses InvoiceRequestDTO everywhere (for invoice.finalized/invoice.payment_succeeded) No longer ignores 0€ invoices: records as OPEN on finalization, then PAID on payment Resolves and passes subscriptionUuid during Transaction creation

New method: resolveSubscriptionUuid(internalSubId, gatewaySubId) Updated createTransaction(...) to accept gatewaySubId and set subscriptionUuid

Improved PaymentIntent retrieval (expand on invoice + fallback via customer) Retains SEND_INVOICE switch logic when automaticRenewal=false

SubscriptionServiceClient

Aligned all routes under the /api/subscriptions prefix Added helpers:

getSubscriptionUuidByInternalId(Long) getSubscriptionUuidByGatewayId(String) (with fallback via internalId)

Rapports de requête de fusion