Leadgen (Romanian company data) Billing API

Paid plans (Pro, Business) on Stripe subscriptions: start a checkout, open the subscription portal. While paid sales are closed, starting a checkout answers 403 checkout_closed; the portal (by key or emailed link) stays open for subscribers. Not lookups: never counted.

GitHub OpenAPI

Operations 9

POST /api/subscribe Subscribe #
GET /api/billing/intent Billing Intent #
GET /api/billing/company/{cui} Billing Company #
POST /api/billing/portal Billing Portal #
POST /api/billing/portal-link Billing Portal Link #
GET /api/withdrawals/available Withdrawals Available #
GET /api/fx/eur-ron Fx Eur Ron #
POST /api/withdrawals Withdrawal Statement #

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/leadgen-adrianhomelab-com:leadgen-adrianhomelab-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

leadgen-adrianhomelab-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Leadgen API — Romanian business registry (ONRC) Billing API
  description: '**Send your key as the `X-API-Key` header.** Anonymous callers get 5 lookups a day; a free key (50/day) takes ten seconds at /start. Read-only JSON over Romania''s official ONRC registry: 4.2M companies, CAEN activities, legal representatives, statuses and financial statements. Search is diacritic-insensitive.'
  version: 2.3.3
servers:
- url: https://leadgen-api.adrianhomelab.com
- url: https://leadgen.adrianhomelab.com
security:
- ApiKeyAuth: []
- {}
tags:
- name: Billing
  description: 'Paid plans (Pro, Business) on Stripe subscriptions: start a checkout, open the subscription portal. While paid sales are closed, starting a checkout answers 403 checkout_closed; the portal (by key or emailed link) stays open for subscribers. Not lookups: never counted.'
paths:
  /api/subscribe:
    post:
      tags:
      - Billing
      summary: Subscribe
      description: 'Start a Pro or Business subscription (`plan`: pro|business, `interval`:

        month|year). The buyer is the holder of the key in `X-API-Key`, the key named

        by a signed `upgrade_token` (the `upgrade` link of a refusal), or an `email`:

        a new address gets a free key when the payment succeeds; an address that

        already has a key gets a confirmation link by email instead (202,

        `kind: confirm_sent`). `buyer_type` company needs `cui`: a Romanian CUI

        (name and address are prefilled from the registry; it must be in the

        register, 422 `company_not_found`, and not struck off, 422

        `company_closed`, checked before any Stripe call), or a company outside

        Romania gives its VAT number with the country prefix (`DE123456789`; not

        looked up: it goes on the Stripe customer and the invoice, Stripe''s page asks only the

        billing address). `consent` must carry `terms` true, plus

        `immediate_start` true for a person or `business_purchase` true for a company.

        Answers `{kind, url}`: `checkout` (Stripe''s payment page) or

        `portal_update` (the key already subscribes: change plan in the portal).

        403 `checkout_closed` while paid plans are not on sale.'
      operationId: subscribe_api_subscribe_post
      parameters:
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: X-Order-Browser
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Order-Browser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscribeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/billing/intent:
    get:
      tags:
      - Billing
      summary: Billing Intent
      description: 'What a signed upgrade link names, for the checkout page: the key''s

        prefix, its plan now, the plan offered and the address (masked).'
      operationId: billing_intent_api_billing_intent_get
      parameters:
      - name: u
        in: query
        required: true
        schema:
          type: string
          maxLength: 2048
          title: U
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/billing/company/{cui}:
    get:
      tags:
      - Billing
      summary: Billing Company
      description: 'A company''s invoice details from our own registry (name, address, VAT

        status) to prefill the checkout, and whether it may subscribe

        (`can_subscribe`: false for a firm struck off, `risk_level` closed). Not a

        lookup: never counted, limited per IP, and only while paid plans are on

        sale. 404 `unknown_cui`: not a firm in our (Romanian) register.'
      operationId: billing_company_api_billing_company__cui__get
      parameters:
      - name: cui
        in: path
        required: true
        schema:
          type: string
          maxLength: 16
          title: Cui
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/billing/portal:
    post:
      tags:
      - Billing
      summary: Billing Portal
      description: 'Open the Stripe Customer Portal for the subscription of the key in

        `X-API-Key`: cancel (at period end), switch plan or interval, change the

        card, billing details, invoices. Answers `{url}` (valid a few minutes).

        Open whether or not paid plans are on sale; while they are not, the portal

        cannot switch plan or interval (its sales-closed configuration), and if

        that configuration is missing the answer is 503 `portal_unavailable`.'
      operationId: billing_portal_api_billing_portal_post
      parameters:
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/PortalRequest'
              - type: 'null'
              title: Req
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/billing/portal-link:
    post:
      tags:
      - Billing
      summary: Billing Portal Link
      description: 'Email a one-time link to the subscription portal to an address that

        has a subscription. The answer is the same whether or not it has one.

        Open whether or not paid plans are on sale (a subscriber can always reach

        the portal).'
      operationId: billing_portal_link_api_billing_portal_link_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalLinkRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/withdrawals/available:
    get:
      tags:
      - Billing
      summary: Withdrawals Available
      description: 'Whether the withdrawal function is offered (the checkout''s footer link

        and /withdraw ask this): true while paid plans are on sale and forever

        once a consumer subscription was sold.'
      operationId: withdrawals_available_api_withdrawals_available_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/fx/eur-ron:
    get:
      tags:
      - Billing
      summary: Fx Eur Ron
      description: 'The euro in RON at the BNR reference rate and its date, for showing RON

        next to EUR prices (F100); the charge is always in EUR. `rate` and `date`

        are null when no rate is known yet: show EUR only.'
      operationId: fx_eur_ron_api_fx_eur_ron_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/withdrawals/link:
    get:
      tags:
      - Billing
      summary: Withdrawals Link
      description: 'What the signed link of a contract confirmation names, to pre-fill

        /withdraw: plan, key prefix, the subscription''s address, the order

        reference and the end of the window. 400 link_invalid once it expired.

        ``withdrawn``: the withdrawal already recorded for this contract (its

        reference and sent time, Romanian time in ``lang``), so the page says so

        instead of showing the form again; null while there is none.'
      operationId: withdrawals_link_api_withdrawals_link_get
      parameters:
      - name: w
        in: query
        required: true
        schema:
          type: string
          maxLength: 2048
          title: W
      - name: lang
        in: query
        required: false
        schema:
          type: string
          maxLength: 5
          default: ro
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/withdrawals:
    post:
      tags:
      - Billing
      summary: Withdrawal Statement
      description: 'A statement of withdrawal from the contract (the checkout''s /withdraw,

        "Confirmați retragerea"). Recorded first; the answer is the receipt (the

        statement as sent and its date and time, Bucharest and UTC), the same

        whatever it matched. The acknowledgement email, the cancellation and the

        pro-rata refund follow (withdrawals.process). No auth; limited per IP.

        A repeat on a contract already withdrawn, named by the link, the key or

        the order reference, also carries ``already`` (the first statement''s

        reference and time) and sends no second email.'
      operationId: withdrawal_statement_api_withdrawals_post
      parameters:
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawalRequest'
      responses:
        '201':
          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
    SubscribeRequest:
      properties:
        plan:
          type: string
          title: Plan
        interval:
          type: string
          title: Interval
          default: month
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        upgrade_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Upgrade Token
        buyer_type:
          type: string
          title: Buyer Type
          default: person
        cui:
          anyOf:
          - type: string
          - type: 'null'
          title: Cui
        company_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Company Name
        consent:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Consent
        lang:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
        via:
          anyOf:
          - type: string
          - type: 'null'
          title: Via
        return_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Return Path
      type: object
      required:
      - plan
      title: SubscribeRequest
    WithdrawalRequest:
      properties:
        name:
          type: string
          title: Name
          default: ''
        contract:
          type: string
          title: Contract
          default: ''
        value:
          type: string
          title: Value
          default: ''
        email:
          type: string
          title: Email
          default: ''
        lang:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
        nonce:
          anyOf:
          - type: string
          - type: 'null'
          title: Nonce
      type: object
      title: WithdrawalRequest
    PortalLinkRequest:
      properties:
        email:
          type: string
          title: Email
        lang:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      type: object
      required:
      - email
      title: PortalLinkRequest
    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
    PortalRequest:
      properties:
        lang:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      type: object
      title: PortalRequest
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Optional. A free key from /start raises the daily lookup limit; anonymous calls still work at a lower limit.