Billing

Create Stripe checkout session

Changed on

Creates a hosted Stripe Checkout session for the authenticated user to start a subscription. The request body selects the desired subscription plan and billing cycle. The backend first creates and persists a Stripe customer for the user, then creates a subscription-mode Checkout session for that customer. Stripe and PostgreSQL are separate systems; an association remains persisted if later session creation fails. This endpoint can only be used when the user does not already have a stripe_customer_id. Requires Cognito JWT or Aura Historia access-token authentication. Delegated access tokens require users:read.

post/api/v1/me/billing/checkout

Request

  • Base URL: https://api.stage.aura-historia.com
  • URL: https://api.stage.aura-historia.com/api/v1/me/billing/checkout
  • 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

Checkout 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