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

# Cancel subscription at period end



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/billing/cancel
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/billing/cancel:
    post:
      tags:
        - billing
      summary: Cancel subscription at period end
      responses:
        '200':
          description: Cancellation scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelResponse'
        '400':
          description: Rejected cancellation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '502':
          description: Provider error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
      security:
        - bearerAuth: []
components:
  schemas:
    CancelResponse:
      type: object
      properties:
        cancel_at_period_end:
          type: boolean
          enum:
            - true
          default: true
        subscription_status:
          type: string
          enum:
            - none
            - active
            - past_due
            - canceled
            - revoked
      required:
        - subscription_status
    BillingError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````