whoisgeni-us Billing API
The billing API from whoisgeni-us — 9 operation(s) for billing.
The billing API from whoisgeni-us — 9 operation(s) for billing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/whoisgeni-us:whoisgeni-us-billing-api"
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.
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: 3.2.0
info:
title: WhoisGenius Billing API
description: 'Domain intelligence platform with AI-powered operator attribution Responses are JSON by default; request the compact, token-efficient TOON format with the `Accept: application/toon` header.'
version: 0.1.0
tags:
- name: Billing
paths:
/billing/checkout:
post:
tags:
- Billing
summary: Create Stripe Checkout Session
description: 'Legacy subscription checkout — discontinued.
New subscription sales ended with the move to one-time credit packs
(2026-08-09 decision). Existing subscribers are unaffected: the Stripe
webhook and customer portal continue to manage their plans. New
purchases go through POST /billing/credits/checkout.'
operationId: create_checkout_billing_checkout_post
security:
- HTTPBearer: []
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/CheckoutRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_CheckoutResponse_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/portal:
get:
tags:
- Billing
summary: Get Stripe Customer Portal URL
description: 'Create a Stripe Customer Portal session for subscription management.
Returns a portal URL where the user can manage their subscription,
update payment methods, or cancel. Requires an active Stripe customer.'
operationId: get_portal_billing_portal_get
security:
- HTTPBearer: []
parameters:
- name: return_url
in: query
required: true
schema:
type: string
title: Return Url
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_PortalResponse_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/subscription:
get:
tags:
- Billing
summary: Get current subscription info
description: 'Return the current subscription details for the authenticated user.
Includes tier, subscription status, and Stripe IDs.'
operationId: get_subscription_billing_subscription_get
security:
- HTTPBearer: []
parameters:
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_SubscriptionInfo_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/credits/checkout:
post:
tags:
- Billing
summary: Create credit pack checkout session
description: 'Create a Stripe Checkout Session for a one-time credit pack purchase.
Maps the requested pack to a Stripe price ID and creates a payment-mode
checkout session. Returns the checkout URL for client-side redirect.'
operationId: create_credit_checkout_billing_credits_checkout_post
security:
- HTTPBearer: []
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/CreditCheckoutRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_CreditCheckoutResponse_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/credits:
get:
tags:
- Billing
summary: Get credit balance
description: 'Return the current credit balance and subscription status for the user.
The has_active_subscription field indicates whether the user has a paid
subscription that covers analyses without requiring credits.'
operationId: get_credits_billing_credits_get
security:
- HTTPBearer: []
parameters:
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_CreditBalance_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/ledger:
get:
tags:
- Billing
summary: List credit ledger movements
description: 'Return a page of the user''s credit-ledger movements, newest first.
Each entry is one grant/debit/refund/follower-free event with the signed
delta, reason, and resulting balance -- the legible audit trail behind the
balance (Dissent 1). User-scoped; never exposes another account''s rows.
``limit``/``offset`` page the journal so a long history can be fully
retrieved for reconciliation (B-18).'
operationId: get_credit_ledger_billing_ledger_get
security:
- HTTPBearer: []
parameters:
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
description: Max rows to return (1-500).
default: 50
title: Limit
description: Max rows to return (1-500).
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Rows to skip for pagination.
default: 0
title: Offset
description: Rows to skip for pagination.
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_list_LedgerEntry__'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/auto-recharge:
get:
tags:
- Billing
summary: Get auto-recharge settings
description: Return the user's credit auto-recharge settings (phase 999.1).
operationId: get_auto_recharge_billing_auto_recharge_get
security:
- HTTPBearer: []
parameters:
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_AutoRechargeSettings_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
put:
tags:
- Billing
summary: Update auto-recharge settings
description: 'Update the user''s auto-recharge settings.
Enabling requires a saved card (add one via POST /billing/auto-recharge/setup);
an enable-without-card attempt or invalid input returns 400.'
operationId: update_auto_recharge_billing_auto_recharge_put
security:
- HTTPBearer: []
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/AutoRechargeUpdateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_AutoRechargeSettings_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/auto-recharge/setup:
post:
tags:
- Billing
summary: Save a card for auto-recharge
description: 'Open a hosted Stripe Checkout (mode=setup) to save a reusable card.
Returns the checkout URL for client redirect. On completion the setup webhook
persists the PaymentMethod onto the user''s config; the user can then enable
auto-recharge via PUT /billing/auto-recharge.'
operationId: setup_auto_recharge_card_billing_auto_recharge_setup_post
security:
- HTTPBearer: []
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/AutoRechargeSetupRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_AutoRechargeSetupResponse_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
/billing/usage:
get:
tags:
- Billing
summary: Get usage dashboard
description: 'Return monthly consumption, remaining quota, and projected overage.
Per PRICE-05: Shows current consumption, remaining quota, billing
period dates, and projected overage cost based on current usage rate.'
operationId: get_usage_dashboard_billing_usage_get
security:
- HTTPBearer: []
parameters:
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse_UsageDashboard_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Unauthorized — missing or invalid API key/JWT.
content:
application/json:
schema:
type: object
properties:
data:
type: 'null'
error:
type: object
properties:
code:
type: string
example: UNAUTHORIZED
message:
type: string
meta:
type: 'null'
components:
schemas:
ErrorDetail:
properties:
code:
type: string
title: Code
message:
type: string
title: Message
details:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Details
type: object
required:
- code
- message
title: ErrorDetail
description: "Structured error information for API error responses.\n\nAttributes:\n code: Machine-readable error code (e.g. \"JOB_NOT_FOUND\").\n message: Human-readable error description.\n details: Optional additional context for debugging."
example:
code: JOB_NOT_FOUND
message: No job found with the given ID.
AutoRechargeSettings:
properties:
enabled:
type: boolean
title: Enabled
threshold_credits:
anyOf:
- type: integer
- type: 'null'
title: Threshold Credits
pack:
anyOf:
- type: string
- type: 'null'
title: Pack
has_saved_card:
type: boolean
title: Has Saved Card
disabled_reason:
anyOf:
- type: string
- type: 'null'
title: Disabled Reason
monthly_cap_usd:
anyOf:
- type: integer
- type: 'null'
title: Monthly Cap Usd
month_spent_usd:
type: integer
title: Month Spent Usd
type: object
required:
- enabled
- threshold_credits
- pack
- has_saved_card
- disabled_reason
- monthly_cap_usd
- month_spent_usd
title: AutoRechargeSettings
description: Current auto-recharge (credit auto-buy) settings for a user.
CheckoutResponse:
properties:
checkout_url:
type: string
title: Checkout Url
session_id:
type: string
title: Session Id
type: object
required:
- checkout_url
- session_id
title: CheckoutResponse
description: Response body after creating a Stripe Checkout Session.
LedgerEntry:
properties:
id:
type: string
title: Id
delta:
type: integer
title: Delta
reason:
type: string
title: Reason
balance_after:
type: integer
title: Balance After
created_at:
type: string
title: Created At
type: object
required:
- id
- delta
- reason
- balance_after
- created_at
title: LedgerEntry
description: A single credit-ledger movement for the credit-history view.
ApiResponse_AutoRechargeSetupResponse_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/AutoRechargeSetupResponse'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[AutoRechargeSetupResponse]
ApiResponse_PortalResponse_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/PortalResponse'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[PortalResponse]
ApiResponse_UsageDashboard_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/UsageDashboard'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[UsageDashboard]
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
AutoRechargeSetupRequest:
properties:
success_url:
type: string
title: Success Url
cancel_url:
type: string
title: Cancel Url
type: object
required:
- success_url
- cancel_url
title: AutoRechargeSetupRequest
description: Request body to open a hosted Checkout for saving an auto-recharge card.
ApiResponse_CreditBalance_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/CreditBalance'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[CreditBalance]
AutoRechargeUpdateRequest:
properties:
enabled:
type: boolean
title: Enabled
threshold_credits:
type: integer
minimum: 0.0
title: Threshold Credits
description: Top up when balance drops below this.
pack:
type: string
enum:
- 100_credits
- 500_credits
- 2000_credits
title: Pack
monthly_cap_usd:
anyOf:
- type: integer
minimum: 0.0
- type: 'null'
title: Monthly Cap Usd
description: Optional monthly USD spend ceiling.
type: object
required:
- enabled
- threshold_credits
- pack
title: AutoRechargeUpdateRequest
description: 'Request body to update auto-recharge settings.
Enabling requires a saved card (enforced server-side -> 400 otherwise).'
AutoRechargeSetupResponse:
properties:
checkout_url:
type: string
title: Checkout Url
session_id:
type: string
title: Session Id
type: object
required:
- checkout_url
- session_id
title: AutoRechargeSetupResponse
description: Response body with the hosted setup-Checkout URL.
CreditCheckoutResponse:
properties:
checkout_url:
type: string
title: Checkout Url
session_id:
type: string
title: Session Id
type: object
required:
- checkout_url
- session_id
title: CreditCheckoutResponse
description: Response body after creating a credit pack checkout session.
ApiResponse_AutoRechargeSettings_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/AutoRechargeSettings'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[AutoRechargeSettings]
CreditCheckoutRequest:
properties:
pack:
type: string
enum:
- 100_credits
- 500_credits
- 2000_credits
title: Pack
success_url:
type: string
title: Success Url
cancel_url:
type: string
title: Cancel Url
type: object
required:
- pack
- success_url
- cancel_url
title: CreditCheckoutRequest
description: Request body for creating a Stripe Checkout Session for credit packs.
ApiResponse_list_LedgerEntry__:
properties:
data:
anyOf:
- items:
$ref: '#/components/schemas/LedgerEntry'
type: array
- type: 'null'
title: Data
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[list[LedgerEntry]]
PortalResponse:
properties:
portal_url:
type: string
title: Portal Url
type: object
required:
- portal_url
title: PortalResponse
description: Response body with Stripe Customer Portal URL.
CheckoutRequest:
properties:
tier:
type: string
enum:
- pro
- team
title: Tier
billing_period:
type: string
enum:
- monthly
- annual
title: Billing Period
default: monthly
success_url:
type: string
title: Success Url
cancel_url:
type: string
title: Cancel Url
type: object
required:
- tier
- success_url
- cancel_url
title: CheckoutRequest
description: Request body for creating a Stripe Checkout Session.
ApiResponse_SubscriptionInfo_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/SubscriptionInfo'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[SubscriptionInfo]
SubscriptionInfo:
properties:
tier:
type: string
title: Tier
subscription_status:
type: string
title: Subscription Status
stripe_subscription_id:
anyOf:
- type: string
- type: 'null'
title: Stripe Subscription Id
stripe_customer_id:
anyOf:
- type: string
- type: 'null'
title: Stripe Customer Id
type: object
required:
- tier
- subscription_status
- stripe_subscription_id
- stripe_customer_id
title: SubscriptionInfo
description: Current subscription details for a user.
UsageDashboard:
properties:
tier:
type: string
title: Tier
count:
type: integer
title: Count
quota:
type: integer
title: Quota
percentage:
type: number
title: Percentage
remaining:
type: integer
title: Remaining
billing_period_start:
type: string
title: Billing Period Start
billing_period_end:
type: string
title: Billing Period End
projected_overage_cost:
type: number
title: Projected Overage Cost
overage_rate:
type: number
title: Overage Rate
credit_balance:
type: integer
title: Credit Balance
has_active_subscription:
type: boolean
title: Has Active Subscription
llm_query_count:
type: integer
title: Llm Query Count
default: 0
llm_total_tokens:
type: integer
title: Llm Total Tokens
default: 0
llm_estimated_cost_usd:
type: number
title: Llm Estimated Cost Usd
default: 0.0
type: object
required:
- tier
- count
- quota
- percentage
- remaining
- billing_period_start
- billing_period_end
- projected_overage_cost
- overage_rate
- credit_balance
- has_active_subscription
title: UsageDashboard
description: Usage dashboard showing monthly consumption and quota status.
ApiResponse_CreditCheckoutResponse_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/CreditCheckoutResponse'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[CreditCheckoutResponse]
ApiResponse_CheckoutResponse_:
properties:
data:
anyOf:
- $ref: '#/components/schemas/CheckoutResponse'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
meta:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Meta
type: object
title: ApiResponse[CheckoutResponse]
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CreditBalance:
properties:
balance:
type: integer
title: Balance
has_active_subscription:
type: boolean
title: Has Active Subscription
type: object
required:
- balance
- has_active_subscription
title: CreditBalance
description: Current credit balance and subscription status for a user.
securitySchemes:
HTTPBearer:
type: http
scheme: bearer