Potarix Billing API

Credit purchase and off-session top-up.

GitHub OpenAPI

Operations 4

GET /billing/products List the credit purchase tiers #
POST /billing/checkout-session Create a Stripe Checkout URL to buy credits #
POST /billing/checkout Create a Stripe Checkout URL (short alias) #
POST /billing/topup Buy credits off-session using the saved card #

Specifications

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

potarix-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Potarix Enricher Billing API
  description: 'Company-data enrichment API. Resolve a company name to its website, find a person''s verified work email, recover decision-maker emails from a domain, turn a LinkedIn URL into an email, scrape a company-wide email roster, or run the full enricher in one call. Each successful lookup spends credits from the caller''s balance. New accounts get 25 free trial credits.


    Auth: every billable and account endpoint takes a bearer token in the Authorization header. The token is a Potarix API key that starts with "ptk_live_". Agents can self-serve a key with no browser via POST /auth/signup (new account) or POST /auth/api-keys (existing account), both of which take email + password and return the key once.


    Credit costs per call: find-website 2, find-email/person 25, find-email/decision-maker 25, find-email/linkedin 10, find-email/company 25 (flat per call). find-all is the sum of the sub-calls it runs. Whiffed lookups (no result) are not charged. A repeat lookup of the same input by the same user is served from cache for free.


    Versioning and deprecation: this is API v1, served at the stable base URL above. Backwards-incompatible changes ship under a new major version (for example a /v2 base path) while the current version stays available. Clients may pin a version with the optional Api-Version request header. Deprecations are announced via the Deprecation and Sunset response headers with at least 90 days notice.


    Rate limits: every response carries RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers so agents can self-pace and back off politely.


    Idempotency: enrichment lookups are idempotent and cached per caller, and accept an optional Idempotency-Key header so automated clients can safely retry without double-charging credits.'
  version: 1.0.0
  contact:
    name: Potarix
    url: https://enricher.potarix.com
servers:
- url: https://api.potarix.com/enricher
  description: Production
security:
- ApiKeyAuth: []
- OAuth2ClientCredentials:
  - enricher:all
tags:
- name: Billing
  description: Credit purchase and off-session top-up.
paths:
  /billing/products:
    get:
      operationId: listBillingProducts
      summary: List the credit purchase tiers
      description: Return the available credit packs (key, name, credit count, USD price, and the Stripe price id for the active mode). No auth required.
      tags:
      - Billing
      security: []
      responses:
        '200':
          description: Available credit tiers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tier'
              example:
              - key: 1k
                name: 1,000 credits
                credits: 1000
                amount_usd: 10
                price_id: price_abc123
              - key: 5k
                name: 5,000 credits
                credits: 5000
                amount_usd: 50
                price_id: price_def456
              - key: 25k
                name: 25,000 credits
                credits: 25000
                amount_usd: 250
                price_id: price_ghi789
  /billing/checkout-session:
    post:
      operationId: createCheckoutSession
      summary: Create a Stripe Checkout URL to buy credits
      description: Create a hosted Stripe Checkout URL for the chosen tier. A human must open the returned URL once in a browser to enter card details; the card is saved for future off-session top-ups. After this one browser trip, an agent can buy more credits silently via POST /billing/topup. Accepts an API key bearer token. Credits are granted by the Stripe webhook after payment, not synchronously here.
      tags:
      - Billing
      security:
      - ApiKeyAuth: []
      - OAuth2ClientCredentials:
        - enricher:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TierKeyRequest'
            example:
              tier_key: 5k
      responses:
        '200':
          description: Checkout session created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSessionResponse'
              example:
                url: https://checkout.stripe.com/c/pay/cs_live_a1b2c3
                session_id: cs_live_a1b2c3
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/Unconfigured'
  /billing/checkout:
    post:
      operationId: createCheckout
      summary: Create a Stripe Checkout URL (short alias)
      description: Friendlier alias of /billing/checkout-session with identical behavior and response. Accepts an API key bearer token.
      tags:
      - Billing
      security:
      - ApiKeyAuth: []
      - OAuth2ClientCredentials:
        - enricher:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TierKeyRequest'
            example:
              tier_key: 5k
      responses:
        '200':
          description: Checkout session created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/Unconfigured'
  /billing/topup:
    post:
      operationId: topupCredits
      summary: Buy credits off-session using the saved card
      description: Charge the caller's saved card off-session and add the tier's credits immediately. Requires that the user has completed checkout at least once (so a card is on file). Returns status "succeeded" with the new balance on success. Returns status "requires_action" with a next_action_url when the card needs SCA/3DS; hand that URL to a human to confirm. Returns 402 with error "no_saved_card" if no card is on file yet (do a checkout first). Accepts an API key bearer token.
      tags:
      - Billing
      security:
      - ApiKeyAuth: []
      - OAuth2ClientCredentials:
        - enricher:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TierKeyRequest'
            example:
              tier_key: 5k
      responses:
        '200':
          description: Top-up result (succeeded or requires_action).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopupResponse'
              example:
                status: succeeded
                credits_added: 5000
                credits_remaining: 5861
                payment_intent_id: pi_live_a1b2c3
                next_action_url: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: No saved card on file, or the payment did not complete.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
              example:
                detail:
                  error: no_saved_card
                  message: No saved card on file. POST /billing/checkout once to add one (browser trip), then top-ups are silent.
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  schemas:
    TopupResponse:
      type: object
      required:
      - status
      - credits_added
      - credits_remaining
      - payment_intent_id
      properties:
        status:
          type: string
          enum:
          - succeeded
          - requires_action
        credits_added:
          type: integer
        credits_remaining:
          type: integer
        payment_intent_id:
          type: string
        next_action_url:
          type:
          - string
          - 'null'
          description: Set when status is requires_action; hand to a human to confirm SCA/3DS.
    Tier:
      type: object
      required:
      - key
      - name
      - credits
      - amount_usd
      properties:
        key:
          type: string
          enum:
          - 1k
          - 5k
          - 25k
        name:
          type: string
        credits:
          type: integer
        amount_usd:
          type: integer
        price_id:
          type:
          - string
          - 'null'
    StructuredError:
      type: object
      description: Typed error object with a stable, machine-readable error code.
      required:
      - error
      - message
      properties:
        error:
          type: string
          description: Stable machine-readable error code agents can branch on.
          enum:
          - invalid_token
          - insufficient_credits
          - no_saved_card
          - user_exists
          - bad_request
          - email_not_found
          - not_found
          - upstream_error
          - unconfigured
          - server_error
        message:
          type: string
          description: Human-readable explanation with a suggested recovery step.
        credits_remaining:
          type:
          - integer
          - 'null'
          description: Caller credit balance, included on credit-related errors.
    CheckoutSessionResponse:
      type: object
      required:
      - url
      - session_id
      properties:
        url:
          type: string
          description: Hosted Stripe Checkout URL. A human must open this to enter card details.
        session_id:
          type: string
    TierKeyRequest:
      type: object
      required:
      - tier_key
      properties:
        tier_key:
          type: string
          enum:
          - 1k
          - 5k
          - 25k
          description: Which credit pack to buy.
    ErrorDetail:
      type: object
      description: Standard error envelope. detail is either a human-readable string or a structured error object carrying a stable machine-readable error code.
      required:
      - detail
      properties:
        detail:
          description: Error message string, or a structured error object.
          anyOf:
          - type: string
          - $ref: '#/components/schemas/StructuredError'
  responses:
    Unconfigured:
      description: Requested tier is not configured for the active billing mode.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          example:
            detail: Tier 5k not configured for live mode.
    UpstreamError:
      description: Payment provider (Stripe) error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          example:
            detail: 'Stripe error: your card was declined.'
    BadRequest:
      description: Invalid or missing request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          example:
            detail: domain is required.
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          example:
            detail: Invalid API key
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Potarix Enricher API key. Send it as: Authorization: Bearer ptk_live_xxx. Mint one with POST /auth/signup or POST /auth/api-keys.'
    OAuth2ClientCredentials:
      type: oauth2
      description: 'OAuth 2.0 client-credentials flow (RFC 6749 section 4.4) for agents that prefer short-lived bearer tokens. Use your ptk_live_ API key as the client_secret (client_id is the key prefix). The minted access token resolves to the same account and credit balance as the API key. Discovery: /.well-known/oauth-authorization-server (RFC 8414) and /.well-known/oauth-protected-resource (RFC 9728).'
      flows:
        clientCredentials:
          tokenUrl: https://api.potarix.com/enricher/oauth/token
          scopes:
            enricher:all: Full access to every enrichment, account, and billing endpoint.
            enricher:read: Read-only enrichment and account lookups.
            enricher:write: Billable mutations such as billing top-ups and checkout.