TubeGrade Billing API

The billing API from TubeGrade, for billing.

GitHub OpenAPI

Operations 7

GET /billing/config Billing Config #
GET /billing/intro-eligibility Intro Eligibility #
POST /billing/checkout Create Checkout #
POST /billing/credits/checkout Create Credit Checkout #
POST /billing/webhook Dodo Webhook #
GET /billing/subscription Subscription Status #
POST /billing/portal Billing Portal #

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/tubegrade-com:tubegrade-com-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

tubegrade-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fast Billing API
  version: 0.1.0
tags:
- name: Billing
paths:
  /billing/config:
    get:
      tags:
      - Billing
      summary: Billing Config
      description: Plan + price metadata for the pricing UI. No secrets.
      operationId: billing_config_billing_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Billing Config Billing Config Get
  /billing/intro-eligibility:
    get:
      tags:
      - Billing
      summary: Intro Eligibility
      description: 'Whether THIS user would get the auto-applied first-month-$1 offer.


        Display-only helper so the pricing UI stops advertising $1 to

        ex-subscribers (who''d be charged full price by the checkout gate).

        On a lookup error we report eligible — same as the logged-out

        default — because hiding the offer from a genuinely new user costs

        a conversion, while the rare mismatch just means checkout shows

        full price (which the checkout path enforces anyway).'
      operationId: intro_eligibility_billing_intro_eligibility_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: __Host-auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Auth Token'
      - name: auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
      - name: __Host-session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Session Ref'
      - name: session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Ref
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Intro Eligibility Billing Intro Eligibility Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/checkout:
    post:
      tags:
      - Billing
      summary: Create Checkout
      description: 'Start a hosted checkout for the chosen plan; returns the URL the

        frontend should redirect the user to.'
      operationId: create_checkout_billing_checkout_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: __Host-auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Auth Token'
      - name: auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
      - name: __Host-session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Session Ref'
      - name: session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Ref
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/credits/checkout:
    post:
      tags:
      - Billing
      summary: Create Credit Checkout
      description: 'Start a hosted checkout for a one-time credit pack. The credits granted

        and the price are computed server-side from the (clamped) block count, so

        the client can''t buy more than it pays for.'
      operationId: create_credit_checkout_billing_credits_checkout_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: __Host-auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Auth Token'
      - name: auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
      - name: __Host-session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Session Ref'
      - name: session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Ref
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCheckoutRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/webhook:
    post:
      tags:
      - Billing
      summary: Dodo Webhook
      description: Receive + verify a Dodo webhook, then apply the entitlement change.
      operationId: dodo_webhook_billing_webhook_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/subscription:
    get:
      tags:
      - Billing
      summary: Subscription Status
      description: 'Lets Settings show "Fix payment" instead of "Upgrade to Pro" to a user

        whose Pro is paused by a failed renewal (they''re plan=free meanwhile).'
      operationId: subscription_status_billing_subscription_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: __Host-auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Auth Token'
      - name: auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
      - name: __Host-session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Session Ref'
      - name: session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Ref
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Subscription Status Billing Subscription Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/portal:
    post:
      tags:
      - Billing
      summary: Billing Portal
      description: 'Open the Dodo customer portal where the user can switch plan, update

        the card, or cancel. 404 if they have no subscription on file.'
      operationId: billing_portal_billing_portal_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: __Host-auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Auth Token'
      - name: auth_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
      - name: __Host-session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: '  Host-Session Ref'
      - name: session_ref
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Ref
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    CreditCheckoutRequest:
      properties:
        blocks:
          type: integer
          title: Blocks
      type: object
      required:
      - blocks
      title: CreditCheckoutRequest
    CheckoutRequest:
      properties:
        plan:
          type: string
          title: Plan
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
      type: object
      required:
      - plan
      title: CheckoutRequest