> ## Documentation Index
> Fetch the complete documentation index at: https://formbnb.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing Portal

> Create a Stripe billing portal session for managing subscription and payment methods.



## OpenAPI

````yaml POST /billing/portal
openapi: 3.1.0
info:
  title: FormBnB API
  version: 1.0.0
  description: API for FormBnB - Form backend as a service
servers:
  - url: https://api.formbnb.com
security: []
paths:
  /billing/portal:
    post:
      tags:
        - Billing
      summary: Create a Stripe billing portal session
      description: >-
        Create a Stripe billing portal session for managing subscription and
        payment methods.
      responses:
        '200':
          description: Portal session created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalResponse'
        '400':
          description: No billing account found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PortalResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: Stripe billing portal URL
      required:
        - url
    BillingErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Authentication using either a FormBnB session JWT (issued by /auth) or
        an API key (prefixed with sk_). Both token types are passed as Bearer
        tokens in the Authorization header.

````