Legal Data Hunter Billing API

The Billing API from Legal Data Hunter — 13 operation(s) for billing.

GitHub OpenAPI

Operations 15

POST /v1/billing/team-upgrade Team Upgrade #
POST /v1/billing/plan-upgrade Plan Upgrade #
GET /v1/billing/plans List Plans #
POST /v1/billing/audience Set Pricing Audience #
POST /v1/billing/checkout/verify Verify Checkout #
GET /v1/billing/promo Get Promo Status #
POST /v1/billing/checkout Create Checkout #
GET /v1/billing/credit-topups/auto Get Auto Topup #
PUT /v1/billing/credit-topups/auto Set Auto Topup #
POST /v1/billing/credit-topups/checkout Create Credit Topup Checkout #
GET /v1/billing/portal Billing Portal #
POST /v1/billing/portal Billing Portal #
GET /v1/billing/status Billing Status #
POST /v1/billing/webhooks Stripe Webhook #
POST /v1/billing/webhooks/us Stripe Us Webhook #

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/legaldatahunter-com:legaldatahunter-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

legaldatahunter-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Legal Search Billing API
  description: Hybrid semantic + keyword search over EU legal data (case law, legislation, doctrine).
  version: 0.1.0
tags:
- name: Billing
paths:
  /v1/billing/team-upgrade:
    post:
      tags:
      - Billing
      summary: Team Upgrade
      description: Preview first; a signed, unchanged quote and fresh assent permit one update.
      operationId: team_upgrade_v1_billing_team_upgrade_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamUpgradeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/plan-upgrade:
    post:
      tags:
      - Billing
      summary: Plan Upgrade
      description: Upgrade one paid Professional seat to Plus on its existing billing account.
      operationId: plan_upgrade_v1_billing_plan_upgrade_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanUpgradeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/plans:
    get:
      tags:
      - Billing
      summary: List Plans
      description: Return legacy schema by default; audience catalogues are additive.
      operationId: list_plans_v1_billing_plans_get
      parameters:
      - name: audience
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Audience
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/audience:
    post:
      tags:
      - Billing
      summary: Set Pricing Audience
      description: Persist an authenticated Free user's explicit audience selection.
      operationId: set_pricing_audience_v1_billing_audience_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AudienceRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/checkout/verify:
    post:
      tags:
      - Billing
      summary: Verify Checkout
      description: Confirm checkout with Stripe and return only allowlisted attribution.
      operationId: verify_checkout_v1_billing_checkout_verify_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutVerificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/promo:
    get:
      tags:
      - Billing
      summary: Get Promo Status
      description: Check if a promotion code is valid and return discount info + seats remaining.
      operationId: get_promo_status_v1_billing_promo_get
      parameters:
      - name: code
        in: query
        required: true
        schema:
          type: string
          title: Code
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/checkout:
    post:
      tags:
      - Billing
      summary: Create Checkout
      description: Create a Stripe Checkout Session for upgrading to a paid plan.
      operationId: create_checkout_v1_billing_checkout_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/credit-topups/auto:
    get:
      tags:
      - Billing
      summary: Get Auto Topup
      description: Return the user's auto top-up setting and its enforced terms.
      operationId: get_auto_topup_v1_billing_credit_topups_auto_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    put:
      tags:
      - Billing
      summary: Set Auto Topup
      description: Persist an explicitly opted-in auto top-up rule for an eligible plan.
      operationId: set_auto_topup_v1_billing_credit_topups_auto_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoTopupRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/credit-topups/checkout:
    post:
      tags:
      - Billing
      summary: Create Credit Topup Checkout
      description: Create a one-time Stripe Checkout Session for credits that stay until used.
      operationId: create_credit_topup_checkout_v1_billing_credit_topups_checkout_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditTopupRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/billing/portal:
    get:
      tags:
      - Billing
      summary: Billing Portal
      description: Create a Customer Portal session for the authenticated user's billing account.
      operationId: billing_portal_v1_billing_portal_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Billing
      summary: Billing Portal
      description: Create a Customer Portal session for the authenticated user's billing account.
      operationId: billing_portal_v1_billing_portal_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/billing/status:
    get:
      tags:
      - Billing
      summary: Billing Status
      description: Get current plan and subscription info.
      operationId: billing_status_v1_billing_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/billing/webhooks:
    post:
      tags:
      - Billing
      summary: Stripe Webhook
      operationId: stripe_webhook_v1_billing_webhooks_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/billing/webhooks/us:
    post:
      tags:
      - Billing
      summary: Stripe Us Webhook
      operationId: stripe_us_webhook_v1_billing_webhooks_us_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    CheckoutRequest:
      properties:
        plan:
          type: string
          title: Plan
        interval:
          type: string
          title: Interval
          default: monthly
        quantity:
          type: integer
          title: Quantity
          default: 1
        workspace_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Workspace Name
        promo_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Promo Code
        audience:
          anyOf:
          - type: string
          - type: 'null'
          title: Audience
        legal_accepted:
          type: boolean
          title: Legal Accepted
          default: false
      type: object
      required:
      - plan
      title: CheckoutRequest
    PlanUpgradeRequest:
      properties:
        plan:
          type: string
          title: Plan
        interval:
          type: string
          title: Interval
          default: monthly
        quantity:
          type: integer
          title: Quantity
          default: 1
        quote:
          anyOf:
          - type: string
          - type: 'null'
          title: Quote
        legal_accepted:
          type: boolean
          title: Legal Accepted
          default: false
      type: object
      required:
      - plan
      title: PlanUpgradeRequest
    TeamUpgradeRequest:
      properties:
        plan:
          type: string
          title: Plan
        interval:
          type: string
          title: Interval
          default: yearly
        quantity:
          type: integer
          title: Quantity
          default: 2
        quote:
          anyOf:
          - type: string
          - type: 'null'
          title: Quote
        legal_accepted:
          type: boolean
          title: Legal Accepted
          default: false
      type: object
      required:
      - plan
      title: TeamUpgradeRequest
    AudienceRequest:
      properties:
        audience:
          type: string
          title: Audience
      type: object
      required:
      - audience
      title: AudienceRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreditTopupRequest:
      properties:
        amount_usd:
          anyOf:
          - type: number
          - type: string
          title: Amount Usd
      type: object
      required:
      - amount_usd
      title: CreditTopupRequest
    CheckoutVerificationRequest:
      properties:
        session_id:
          type: string
          title: Session Id
      type: object
      required:
      - session_id
      title: CheckoutVerificationRequest
    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
    AutoTopupRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        threshold_usd:
          anyOf:
          - type: number
          - type: string
          title: Threshold Usd
          default: '10'
        amount_usd:
          anyOf:
          - type: number
          - type: string
          title: Amount Usd
          default: '10'
        monthly_spend_cap_usd:
          anyOf:
          - type: number
          - type: string
          - type: 'null'
          title: Monthly Spend Cap Usd
      type: object
      title: AutoTopupRequest