Nevercode Billing API

REST API endpoints for billing.

Operations 11

POST /api/v3/teams/{team_id}/subscriptions/{subscription_id}/promotion-code Apply promotion code to subscription #
GET /api/v3/teams/{team_id}/subscriptions/{subscription_id} Get subscription details #
DELETE /api/v3/teams/{team_id}/subscriptions/{subscription_id} Cancel team subscription #
GET /api/v3/teams/{team_id}/subscriptions List team subscriptions #
POST /api/v3/teams/{team_id}/subscriptions Create team subscription #
GET /api/v3/teams/{team_id}/subscriptions/{subscription_id}/invoice-preview Get subscription invoice preview #
GET /api/v3/teams/{team_id}/subscriptions/{subscription_id}/invoices List subscription invoices #
PUT /api/v3/teams/{team_id}/subscriptions/{subscription_id}/default-payment-method Set subscription default payment method #
GET /api/v3/teams/{team_id}/cards List team cards #
POST /api/v3/teams/{team_id}/invoice-preview Generate invoice preview for chosen line items #
GET /api/v3/teams/{team_id}/invoices List team invoices #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nevercode-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nevercode-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codemagic App Previews Billing API
  version: v3.0
  description: "\n# ℹ️ Overview\n\nWelcome to the Codemagic REST API. This API allows you to programmatically interact with [Codemagic's CI/CD](https://codemagic.io/) platform\nto manage your apps, trigger builds, access artifacts, and more.\n\n### Authentication\n\nAll API requests require authentication using a personal API token that is unique to each Codemagic user. The actions permitted by the token are determined by the user’s role within the team.\n\nYou can find your API token by navigating to **Teams > Personal Account > Integrations > Codemagic API > Show**.\n\nInclude your token in the request header:\n\n```\nx-auth-token: <your-api-token>\n```\n\n### Getting started\n\n1. Generate your API token from the Codemagic dashboard\n2. Explore the available endpoints in the sidebar\n3. Try out requests directly from this documentation\n\n### Rate limits\n\nCodemagic limits the number of API requests you can make within a specific amount of time to ensure the API remains\navailable for all users. Your personal rate limit is **5,000 requests per hour**.\n\nIf you exceed your rate limit, you will receive a `429` response, and the `ratelimit-remaining` header will be `0`.\nYou should not retry your request until after the time specified by the `ratelimit-reset` header.\n\n#### Checking the status of your rate limit\n\nYou can use the headers that are sent with each response to determine the current status of your rate limit.\n\n| **Header** | **Description** |\n| ---    | ---         |\n| ratelimit-limit | The maximum number of requests that you can make per hour. |\n| ratelimit-remaining | The number of requests remaining in the current rate limit window. |\n| ratelimit-reset | The number of seconds remaining until the current rate limit window resets. |\n\n### Help and support\n\n- Ask our [GitHub community](https://github.com/codemagic-ci-cd/codemagic-docs/discussions).\n- Our paying customers can get in touch with us via the in-app chat widget.\n  You have to be logged in to see the chat icon (note that some ad blockers may block the chat widget).\n\n---\n&copy; Nevercode Ltd. | All Rights Reserved | Codemagic is registered trademark of Nevercode Ltd. | [Terms](https://codemagic.io/terms)\n"
servers:
- url: https://codemagic.io/
  x-internal: false
security:
- api_key: []
tags:
- name: Billing
  description: REST API endpoints for billing.
  external_docs: null
paths:
  /api/v3/teams/{team_id}/subscriptions/{subscription_id}/promotion-code:
    post:
      tags:
      - Billing
      summary: Apply promotion code to subscription
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdPromotionCodeApplySubscriptionPromotionCode
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyPromotionCodeSchema'
        required: true
      responses:
        '204':
          description: Request fulfilled, nothing follows
          headers: {}
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Promotion code cannot be applied to this subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
  /api/v3/teams/{team_id}/subscriptions/{subscription_id}:
    get:
      tags:
      - Billing
      summary: Get subscription details
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdGetSubscription
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoPagination_api.routes.team_subscriptions.schemas.SubscriptionDetailsSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Subscription details are not available for this subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
    delete:
      tags:
      - Billing
      summary: Cancel team subscription
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdCancelSubscription
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '202':
          description: Request accepted, processing continues off-line
          headers: {}
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Subscription details are not available for this subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
  /api/v3/teams/{team_id}/subscriptions:
    get:
      tags:
      - Billing
      summary: List team subscriptions
      operationId: ApiV3TeamsTeamIdSubscriptionsListTeamSubscriptions
      parameters:
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoPagination_list_api.routes.team_subscriptions.schemas.SubscriptionSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
    post:
      tags:
      - Billing
      summary: Create team subscription
      operationId: ApiV3TeamsTeamIdSubscriptionsCreateTeamSubscription
      parameters:
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionSchema'
        required: true
      responses:
        '201':
          description: Document created, URL follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoPagination_api.routes.team_subscriptions.schemas.SubscriptionDetailsSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Billing is not configured for the team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
  /api/v3/teams/{team_id}/subscriptions/{subscription_id}/invoice-preview:
    get:
      tags:
      - Billing
      summary: Get subscription invoice preview
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdInvoicePreviewGetSubscriptionInvoicePreview
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoPagination_api.routes.team_subscriptions.schemas.InvoicePreviewSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
  /api/v3/teams/{team_id}/subscriptions/{subscription_id}/invoices:
    get:
      tags:
      - Billing
      summary: List subscription invoices
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdInvoicesListSubscriptionInvoices
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: cursor
        in: query
        schema:
          oneOf:
          - type: string
          - type: 'null'
          description: A unique identifier after which the results should be returned.
        description: A unique identifier after which the results should be returned.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: page_size
        in: query
        schema:
          type: integer
          maximum: 100.0
          minimum: 1.0
          description: The maximum number of results per page.
          default: 30
        description: The maximum number of results per page.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPagination_str_api.routes.team_subscriptions.schemas.InvoiceSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
  /api/v3/teams/{team_id}/subscriptions/{subscription_id}/default-payment-method:
    put:
      tags:
      - Billing
      summary: Set subscription default payment method
      operationId: ApiV3TeamsTeamIdSubscriptionsSubscriptionIdDefaultPaymentMethodSetSubscriptionDefaultPaymentMethod
      parameters:
      - name: subscription_id
        in: path
        schema:
          type: string
          examples:
          - 60a0b1c2d3e4f56789abcdef
        required: true
        deprecated: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodSchema'
        required: true
      responses:
        '204':
          description: Request fulfilled, nothing follows
          headers: {}
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Request could not be processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
  /api/v3/teams/{team_id}/cards:
    get:
      tags:
      - Billing
      summary: List team cards
      operationId: ApiV3TeamsTeamIdCardsListTeamCards
      parameters:
      - name: cursor
        in: query
        schema:
          oneOf:
          - type: string
          - type: 'null'
          description: A unique identifier after which the results should be returned.
        description: A unique identifier after which the results should be returned.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: page_size
        in: query
        schema:
          type: integer
          maximum: 100.0
          minimum: 1.0
          description: The maximum number of results per page.
          default: 30
        description: The maximum number of results per page.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPagination_str_api.routes.team_cards.schemas.CardSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
        '422':
          description: Billing is not configured for the team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseSchema'
      deprecated: false
  /api/v3/teams/{team_id}/invoice-preview:
    post:
      tags:
      - Billing
      summary: Generate invoice preview for chosen line items
      operationId: ApiV3TeamsTeamIdInvoicePreviewGenerateInvoicePreview
      parameters:
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateInvoicePreview'
        required: true
      responses:
        '201':
          description: Document created, URL follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoPagination_api.routes.team_invoice_preview.schemas.Invoice_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
  /api/v3/teams/{team_id}/invoices:
    get:
      tags:
      - Billing
      summary: List team invoices
      operationId: ApiV3TeamsTeamIdInvoicesListTeamInvoices
      parameters:
      - name: cursor
        in: query
        schema:
          oneOf:
          - type: string
          - type: 'null'
          description: A unique identifier after which the results should be returned.
        description: A unique identifier after which the results should be returned.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: page_size
        in: query
        schema:
          type: integer
          maximum: 100.0
          minimum: 1.0
          description: The maximum number of results per page.
          default: 30
        description: The maximum number of results per page.
        required: false
        deprecated: false
        allowEmptyValue: false
        allowReserved: false
      - name: team_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPagination_str_api.routes.team_invoices.schemas.InvoiceSchema_'
        '400':
          description: Bad request syntax or unsupported method
          content:
            application/json:
              schema:
                properties:
                  status_code:
                    type: integer
                  detail:
                    type: string
                  extra:
                    additionalProperties: {}
                    type:
                    - 'null'
                    - object
                    - array
                type: object
                required:
                - detail
                - status_code
                description: Validation Exception
                examples:
                - status_code: 400
                  detail: Bad Request
                  extra: {}
      deprecated: false
components:
  schemas:
    SubscriptionSchema:
      properties:
        id: {}
        pricing_model:
          $ref: '#/components/schemas/PricingModel'
        status:
          $ref: '#/components/schemas/SubscriptionStatus'
        category:
          $ref: '#/components/schemas/ProductCategory'
        trial_end_at:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
      type: object
      required:
      - category
      - id
      - pricing_model
      - status
      title: SubscriptionSchema
    CreateSubscriptionItemSchema:
      properties:
        product_slug:
          $ref: '#/components/schemas/ProductSlug'
      type: object
      required:
      - product_slug
      title: CreateSubscriptionItemSchema
    PaymentMethodType:
      type: string
      enum:
      - card
      title: PaymentMethodType
    OwnerSchema:
      properties:
        name:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      required: []
      title: OwnerSchema
    SubscriptionStatus:
      type: string
      enum:
      - disabled
      - active
      - incomplete
      - incomplete_expired
      - unpaid
      - paused
      - past_due
      - trialing
      - canceled
      title: SubscriptionStatus
    CardSchema:
      properties:
        provider_id:
          type: string
        owner:
          $ref: '#/components/schemas/OwnerSchema'
        card:
          $ref: '#/components/schemas/CardDetailsSchema'
      type: object
      required:
      - card
      - owner
      - provider_id
      title: CardSchema
    team_subscriptions_schemas_InvoiceSchema:
      properties:
        provider_id:
          type: string
        status:
          oneOf:
          - $ref: '#/components/schemas/team_subscriptions_schemas_InvoiceStatus'
          - type: 'null'
        total:
          type: integer
        created_at:
          type: string
          format: date-time
        billing_reason:
          oneOf:
          - type: string
          - type: 'null'
        url:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      required:
      - created_at
      - provider_id
      - total
      title: InvoiceSchema
    CursorPagination_str_api.routes.team_subscriptions.schemas.InvoiceSchema_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/team_subscriptions_schemas_InvoiceSchema'
          type: array
        page_size:
          type: integer
        cursor:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      required:
      - data
      - page_size
      title: CursorPagination[str, InvoiceSchema]
    NoPagination_api.routes.team_invoice_preview.schemas.Invoice_:
      properties:
        data:
          $ref: '#/components/schemas/Invoice'
      type: object
      required:
      - data
      title: NoPagination[Invoice]
    InvoicePreviewTaxSchema:
      properties:
        description:
          type: string
        percentage:
          type: string
          description: Decimal value serialized as a string to avoid floating-point precision loss.
          examples:
          - '19.99'
        effective_percentage:
          oneOf:
          - type: string
          - type: 'null'
          description: Optional decimal value serialized as a string to avoid floating-point precision loss.
          examples:
          - '19.99'
        amount:
          type: integer
        taxable_amount:
          type: integer
      type: object
      required:
      - amount
      - description
      - effective_percentage
      - percentage
      - taxable_amount
      title: InvoicePreviewTaxSchema
    PaymentMethodSchema:
      properties:
        type:
          $ref: '#/components/schemas/PaymentMethodType'
        provider_id:
          type: string
      type: object
      required:
      - provider_id
      - type
      title: PaymentMethodSchema
    NoPagination_api.routes.team_subscriptions.schemas.SubscriptionDetailsSchema_:
      properties:
        data:
          $ref: '#/components/schemas/SubscriptionDetailsSchema'
      type: object
      required:
      - data
      title: NoPagination[SubscriptionDetailsSchema]
    CardDetailsSchema:
      properties:
        brand:
          type: string
        exp_month:
          type: integer
        exp_year:
          type: integer
        last4:
          type: string
      type: object
      required:
      - brand
      - exp_month
      - exp_year
      - last4
      title: CardDetailsSchema
    PricingModel:
      type: string
      enum:
      - flat_rate
      - usage_based
      - custom
      title: PricingModel
    Discount:
      properties:
        name:
          oneOf:
          - type: string
          - type: 'null'
        source:
          type: string
        amount:
          type: integer
        amount_off:
          oneOf:
          - type: integer
          - type: 'null'
          description: Amount that will be taken off the subtotal.
        currency:
          oneOf:
          - type: string
          - type: 'null'
          description: Three-letter ISO code for the currency of the amount to take off.
        percent_off:
          oneOf:
          - type: string
          - type: 'null'
          description: Percent that will be taken off the subtotal.
        duration:
          $ref: '#/components/schemas/team_invoice_preview_schemas_DiscountDuration'
        duration_in_months:
          oneOf:
          - type: integer
          - type: 'null'
          description: If duration is repeating, the number of months the coupon applies, null otherwise.
      type: object
      required:
      - amount
      - amount_off
      - currency
      - duration
      - duration_in_months
      - percent_off
      - source
      title: Discount
    SubscriptionItemSchema:
      properties:
        provider_id:
          type: string
        created_at:
          type: string
          format: date-time
      type: object
      required:
      - created_at
      - provider_id
      title: SubscriptionItemSchema
    CursorPagination_str_api.routes.team_invoices.schemas.InvoiceSchema_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/team_invoices_schemas_InvoiceSchema'
          type: array
        page_size:
          type: integer
        cursor:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      required:
      - data
      - page_size
      title: CursorPagination[str, InvoiceSchema]
    team_subscriptions_schemas_InvoiceStatus:
      type: string
      enum:
      - draft
      - open
      - paid
      - uncollectible
      - void
      title: InvoiceStatus
    team_subscriptions_schemas_DiscountDuration:
      type: string
      enum:
      - forever
      - once
      - repeating
      title: DiscountDuration
    ProductSlug:
      type: string
      enum:
      - codepush
      title: ProductSlug
    NoPagination_list_api.routes.team_subscriptions.schemas.SubscriptionSchema_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SubscriptionSchema'
          type: array
      type: object
      required:
      - data
      title: NoPagination[list[SubscriptionSchema]]
    InvoicePreviewDiscountSchema:
      properties:
        name:
          oneOf:
          - type: string
          - type: 'null'
        source:
          type: string
        amount:
          type: integer
        amount_off:
          oneOf:
          - type: integer
          - type: 'null'
          description: Amount that will be taken off the subtotal.
        currency:
          oneOf:
          - type: string
          - type: 'null'
          description: Three-letter ISO code for the currency of the amount to take off.
        percent_off:
          oneOf:
          - type: string
          - type: 'null'
          description: Percent that will be taken off the subtotal.
        duration:
          $ref: '#/components/schemas/team_subscriptions_schemas_DiscountDuration'
        duration_in_months:
          oneOf:
          - type: integer
          - type: 'null'
          description: If duration is repeating, the number of months the coupon applies, null otherwise.
      type: object
      required:
      - amount
      - amount_off
      - currency
      - duration
      - duration_in_months
      - percent_off
      - source
      title: InvoicePreviewDiscountSchema
    BillingInterval:
      type: string
      enum:
      - monthly
      - annual
      title: BillingInterval
    team_invoices_schemas_InvoiceSchema:
      properties:
        provider_id:
          type: string
        status:
          oneOf:
          - $ref: '#/components/schemas/team_invoices_schemas_InvoiceStatus'
          - type: 'null'
        total:
          type: integer
        created_at:
          type: string
          format: date-time
        billing_reason:
          oneOf:
          - type: string
          - type: 'null'
        url:
          oneOf:
          - type: string
          - type: 'null'
      type: object
      r

# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/nevercode/refs/heads/main/openapi/nevercode-billing-api-openapi.yml