Skip to content

Account profile endpoint + Billing portal error mapping + Portal support #22

@fupelaqu

Description

@fupelaqu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions