Billing

Create Stripe billing management session

Changed on

Creates a hosted Stripe billing session for the authenticated user through a single entrypoint.

  • Users with tier FREE receive a Stripe Checkout session for the requested plan and cycle.
  • Users with tier PRO or ULTIMATE receive a Stripe customer-portal session instead.

The request body is required for all callers and must contain supported billing enum values. For free users, the backend uses the provided plan and cycle to select the configured Stripe price and creates a Stripe customer first when none exists yet. For paid users, the backend still validates that the body is present and well-formed, but returns a portal session based on the stored Stripe customer rather than purchasing a new plan.

Requires Cognito JWT or Aura Historia access-token authentication. Delegated access tokens require users:read.

post/api/v1/me/billing/manage

Request

  • Base URL: https://api.stage.aura-historia.com
  • URL: https://api.stage.aura-historia.com/api/v1/me/billing/manage
  • Auth: HTTP bearer

Request body

plan'PRO' | 'ULTIMATE' required

Subscription plan that should be purchased through Stripe Checkout

cycle'MONTHLY' | 'YEARLY' required

Billing interval that should be used for the subscription purchase

Example request

{
  "plan": "PRO",
  "cycle": "MONTHLY"
}

Response

Billing management session created successfully

urlstring uri required

Hosted Stripe URL that the frontend should redirect the authenticated user to

Example response

{
  "url": "https://checkout.stripe.com/c/pay/cs_test_123"
}

Changes

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status