4chems Billing API

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

Operations 2

GET /v1/tenant/billing Get Billing #
PUT /v1/tenant/billing Complete Billing #

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/4chems-com:4chems-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

4chems-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: platform-api Billing API
  description: 'Platform API: infrastructure, operational, and customer tiers.'
  version: 0.12.1
tags:
- name: Billing
paths:
  /v1/tenant/billing:
    get:
      tags:
      - Billing
      summary: Get Billing
      description: 'Return the tenant''s stored billing details: VAT id, invoice address, invoice

        email and PO reference. Call this to check whether billing is complete; only

        the owner and billing contacts may read it (`403 rbac.insufficient_level`).'
      operationId: get_billing
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Billing
      summary: Complete Billing
      description: 'Complete the tenant''s billing details: legal-entity name and type, VAT id,

        invoice address, invoice email and optional PO reference. Call this when the

        owner or a billing contact has the details. EU VAT ids are validated against

        VIES by the worker; a failed operation with `billing.vat_check_unavailable`

        can be retried by submitting again. Returns `202` with an operation to poll.'
      operationId: complete_billing
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillingIn'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-destructive: false
      x-idempotent: true
      x-open-world: true
components:
  schemas:
    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
    BillingOut:
      properties:
        name:
          type: string
          title: Name
        country:
          type: string
          title: Country
        legal_entity_type:
          type: string
          title: Legal Entity Type
        other_label:
          anyOf:
          - type: string
          - type: 'null'
          title: Other Label
        vat_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Vat Id
        address_line1:
          anyOf:
          - type: string
          - type: 'null'
          title: Address Line1
        address_line2:
          anyOf:
          - type: string
          - type: 'null'
          title: Address Line2
        postal_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Postal Code
        city:
          anyOf:
          - type: string
          - type: 'null'
          title: City
        invoice_email:
          anyOf:
          - type: string
          - type: 'null'
          title: Invoice Email
        po_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Po Reference
        vat_validated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Vat Validated At
        billing_completed:
          type: boolean
          title: Billing Completed
        billing_completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Billing Completed At
      type: object
      required:
      - name
      - country
      - legal_entity_type
      - billing_completed
      title: BillingOut
      description: The stored billing data, `get_billing` (owner and billing contacts only).
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ErrorDetail
    BillingIn:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 200
            minLength: 1
          - type: 'null'
          title: Name
        legal_entity_type:
          anyOf:
          - type: string
            pattern: ^[A-Z]{2,3}_[A-Z0-9][A-Z0-9_]*$
          - type: 'null'
          title: Legal Entity Type
        other_label:
          anyOf:
          - type: string
            maxLength: 80
            minLength: 2
          - type: 'null'
          title: Other Label
        vat_id:
          anyOf:
          - type: string
            maxLength: 40
          - type: 'null'
          title: Vat Id
        address_line1:
          type: string
          maxLength: 200
          minLength: 1
          title: Address Line1
        address_line2:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Address Line2
        postal_code:
          type: string
          maxLength: 20
          minLength: 1
          title: Postal Code
        city:
          type: string
          maxLength: 100
          minLength: 1
          title: City
        invoice_email:
          type: string
          format: email
          title: Invoice Email
        po_reference:
          anyOf:
          - type: string
            maxLength: 64
            minLength: 1
          - type: 'null'
          title: Po Reference
      type: object
      required:
      - address_line1
      - postal_code
      - city
      - invoice_email
      title: BillingIn
      description: '`complete_billing` body. `vat_id` is checked against the tenant''s country in the service.'
    OperationOut:
      properties:
        operation_id:
          type: string
          format: uuid
          title: Operation Id
        status:
          type: string
          title: Status
        type:
          type: string
          title: Type
        target_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Type
        target_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Id
        result:
          anyOf:
          - {}
          - type: 'null'
          title: Result
        error:
          anyOf:
          - $ref: '#/components/schemas/ErrorDetail'
          - type: 'null'
        created_at:
          type: string
          format: date-time
          title: Created At
        finished_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Finished At
      type: object
      required:
      - operation_id
      - status
      - type
      - created_at
      title: OperationOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer