Nerdit Billing API

The billing API from Nerdit — 4 operation(s) for billing.

GitHub OpenAPI

Operations 4

GET /api/billing This account's plan, renewal state, and whether Pro is on sale #
POST /api/billing/checkout Start a hosted checkout for Pro #
POST /api/billing/portal Open a customer-portal session for this account #
POST /api/billing/webhook Accept one signed provider delivery #

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/nerdit-ai:nerdit-ai-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

nerdit-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nerdit Cloud (web) Billing API
  version: 0.1.0
tags:
- name: Billing
paths:
  /api/billing:
    get:
      tags:
      - Billing
      summary: This account's plan, renewal state, and whether Pro is on sale
      description: 'Answer from the projection, never from the provider.


        Which is what makes this page and the relay agree by construction: they

        are reading the same row, so a person is never shown an entitlement the

        gateway would refuse a second later.'
      operationId: billing_overview_api_billing_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingView'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /api/billing/checkout:
    post:
      tags:
      - Billing
      summary: Start a hosted checkout for Pro
      description: Mint a checkout URL for an account that does not already have one.
      operationId: create_checkout_api_billing_checkout_post
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/CheckoutRequest'
              - type: 'null'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSessionView'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/billing/portal:
    post:
      tags:
      - Billing
      summary: Open a customer-portal session for this account
      description: 'Refuse an account the provider has never met, then hand over a URL.


        The local ``polar_customer_id`` is the gate rather than the key: it is

        how this deployment knows a Polar customer exists, while the session

        itself is minted against the external id so a stale projection can

        never open somebody else''s portal.'
      operationId: create_portal_api_billing_portal_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalSessionView'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /api/billing/webhook:
    post:
      tags:
      - Billing
      summary: Accept one signed provider delivery
      description: 'Verify, resolve current state, project, acknowledge.


        No session, no CSRF exemption to write down: the request carries no

        cookie, so ``CSRFMiddleware`` passes it through untouched and the

        signature is the entire admission decision.'
      operationId: webhook_api_billing_webhook_post
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookAck'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    CheckoutSessionView:
      properties:
        checkout_url:
          type: string
          title: Checkout Url
      additionalProperties: false
      type: object
      required:
      - checkout_url
      title: CheckoutSessionView
      description: Where to send the browser. Holding it grants nothing (W-D10 v2).
    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
    ErrorDetail:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        status:
          type: integer
          title: Status
        request_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Request Id
        details:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Details
      additionalProperties: false
      type: object
      required:
      - code
      - message
      - status
      title: ErrorDetail
      description: The stable body nested under the envelope's ``error`` key.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorCode:
      type: string
      enum:
      - bad_request
      - unauthorized
      - forbidden
      - not_found
      - method_not_allowed
      - conflict
      - validation_failed
      - rate_limited
      - internal_error
      - service_unavailable
      - not_implemented
      - plan_limit_exceeded
      - link_code_invalid
      - link_code_expired
      - link_code_consumed
      - link_code_attempts_exceeded
      - link_code_limit_exceeded
      - link_code_denied
      - link_key_invalid
      - preauth_key_limit_exceeded
      - node_not_found
      - node_already_linked
      - node_offline
      - machine_waking
      - node_revoked
      - entitlement_required
      - organisation_has_members
      - trial_quota_used
      - trial_boxes_busy
      - trial_archived
      - replace.bad_url
      - replace.extractor_unavailable
      - replace.already_claimed
      - csrf_failed
      - auth_transaction_invalid
      - auth_transaction_expired
      - auth_identity_invalid
      - auth_identity_deleting
      - session_invalid
      - session_expired
      - navigation_ticket_invalid
      - navigation_ticket_expired
      - navigation_ticket_consumed
      - proxy_session_invalid
      - proxy_session_expired
      - origin_forbidden
      - hosted_private
      - hosted_disabled
      - visitor_session_required
      - custom_domains.pro_required
      - custom_domains.limit_reached
      - custom_domains.apex_unsupported
      - custom_domains.taken
      - custom_domains.not_found
      - access_revoked
      - webhook_signature_invalid
      - already_subscribed
      - billing_account_missing
      - oauth_invalid_request
      - oauth_invalid_client
      - oauth_invalid_grant
      - oauth_unsupported_grant_type
      - oauth_invalid_scope
      - oauth_access_denied
      - oauth_server_error
      - oauth_temporarily_unavailable
      - oauth_invalid_token
      - oauth_insufficient_scope
      - protocol_version_unsupported
      - node_authentication_failed
      - relay_frame_invalid
      - relay_destination_invalid
      - relay_stream_unknown
      - relay_stream_limit_exceeded
      - relay_body_too_large
      - relay_response_too_large
      - relay_bandwidth_exceeded
      - relay_backpressure
      - relay_draining
      - relay_stream_timeout
      title: ErrorCode
      description: Codes clients may branch on independently of human-readable messages.
    CheckoutRequest:
      properties:
        plan:
          type: string
          const: pro
          title: Plan
          default: pro
      additionalProperties: false
      type: object
      title: CheckoutRequest
      description: Which tier the browser is asking to buy; a body-less POST buys Pro.
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      additionalProperties: false
      type: object
      required:
      - error
      title: ErrorEnvelope
      description: Response model used by all cloud API errors.
    BillingView:
      properties:
        plan:
          type: string
          title: Plan
        status:
          type: string
          title: Status
        hosted_public_entitled:
          type: boolean
          title: Hosted Public Entitled
        current_period_end:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Current Period End
        cancel_at_period_end:
          type: boolean
          title: Cancel At Period End
        trial_ends_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Trial Ends At
        pro_trial_days:
          type: integer
          title: Pro Trial Days
        has_billing_account:
          type: boolean
          title: Has Billing Account
        pro_available:
          type: boolean
          title: Pro Available
      additionalProperties: false
      type: object
      required:
      - plan
      - status
      - hosted_public_entitled
      - current_period_end
      - cancel_at_period_end
      - trial_ends_at
      - pro_trial_days
      - has_billing_account
      - pro_available
      title: BillingView
      description: The whole of what ``/billing`` renders, straight off the projection.
    PortalSessionView:
      properties:
        portal_url:
          type: string
          title: Portal Url
      additionalProperties: false
      type: object
      required:
      - portal_url
      title: PortalSessionView
      description: A short-lived customer-portal URL for self-service plan management.
    WebhookAck:
      properties:
        status:
          type: string
          const: accepted
          title: Status
      additionalProperties: false
      type: object
      required:
      - status
      title: WebhookAck
      description: What Polar is told. Deliberately says nothing about what was decided.