Summary
Three changes to support the Self-Service License Portal (Story 5.12):
1. Account profile endpoint (SoftPayAccountServiceEndpoints)
New GET /account/profile endpoint returning DefaultProfileView for the authenticated user via LoadProfile command. Used by the portal to check authentication status and display user info.
Files changed:
core/.../SoftPayAccountServiceEndpoints.scala — added loadProfile endpoint with ProfileType schema
2. Billing portal error mapping (BasicPaymentService)
BillingPortalSessionNotCreated now maps to HTTP 500 (was falling through to 400 via PaymentError catch-all).
Files changed:
common/.../BasicPaymentService.scala — explicit case for BillingPortalSessionNotCreated => InternalServerError
3. Billing portal SPI + endpoints (from Story 5.11)
BillingPortalApi SPI trait for Stripe Customer Portal session creation
BillingPortalEndpoints with POST /billing-portal
StripeBillingPortalApi implementation using billingportal.Session.create()
- Config:
billing-portal-route in Payment.Config + reference.conf
Summary
Three changes to support the Self-Service License Portal (Story 5.12):
1. Account profile endpoint (SoftPayAccountServiceEndpoints)
New
GET /account/profileendpoint returningDefaultProfileViewfor the authenticated user viaLoadProfilecommand. Used by the portal to check authentication status and display user info.Files changed:
core/.../SoftPayAccountServiceEndpoints.scala— addedloadProfileendpoint withProfileTypeschema2. Billing portal error mapping (BasicPaymentService)
BillingPortalSessionNotCreatednow maps to HTTP 500 (was falling through to 400 viaPaymentErrorcatch-all).Files changed:
common/.../BasicPaymentService.scala— explicit case forBillingPortalSessionNotCreated => InternalServerError3. Billing portal SPI + endpoints (from Story 5.11)
BillingPortalApiSPI trait for Stripe Customer Portal session creationBillingPortalEndpointswithPOST /billing-portalStripeBillingPortalApiimplementation usingbillingportal.Session.create()billing-portal-routein Payment.Config + reference.conf