Niche Billing API
The billing API from Niche — 6 operation(s) for billing.
The billing API from Niche — 6 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/nicheangle-com:nicheangle-com-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: Signal Billing API
version: 0.1.0
tags:
- name: Billing
paths:
/billing/portal:
post:
tags:
- Billing
summary: Create Billing Portal
description: 'Open the Stripe Billing Portal so the user can manage cards,
view invoices, cancel subscriptions, or resolve a payment failure.
409 when:
- Stripe billing isn''t enabled (dev mode w/o Stripe key)
- User has no stripe_customer_id yet (hasn''t subscribed)'
operationId: create_billing_portal_billing_portal_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BillingPortalResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing/checkout:
post:
tags:
- Billing
summary: Create Checkout
operationId: create_checkout_billing_checkout_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing/checkout/topup:
post:
tags:
- Billing
summary: Create Topup Checkout
description: One-time credit-pack checkout. Pack is small / medium / large.
operationId: create_topup_checkout_billing_checkout_topup_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TopupRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing/credits:
get:
tags:
- Billing
summary: Get Credits
description: 'Current credit state for /settings/usage — balance, bucket
expirations, recent transaction history.
Reservation + reservation_release rows are filtered out of the
user-facing transaction list. They''re internal accounting (hold +
release of unused portion during an in-flight run); the user only
cares about real debits + grants + refunds. The full ledger is
still in the DB, accessible via logs + future admin view. Cal
2026-05-29: *"we dont even need to show the reservation at all.
thats inside baseball as humans say."*'
operationId: get_credits_billing_credits_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreditsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing/auto-topup:
get:
tags:
- Billing
summary: Get Auto Topup
description: Current auto-top-up state for /settings/usage.
operationId: get_auto_topup_billing_auto_topup_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AutoTopupState'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Billing
summary: Update Auto Topup
description: 'Enable/disable auto-top-up + tune threshold/pack. Operator-only —
the wedge that justifies the tier. Non-Operators get a 403 upgrade
prompt (the UI hides the control, this is the backstop).'
operationId: update_auto_topup_billing_auto_topup_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AutoTopupUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AutoTopupState'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing/webhook:
post:
tags:
- Billing
summary: Stripe Webhook
description: 'Stripe webhook handler. Verifies signature, parses event, delegates
to stripe_billing.handle_event. Returns 200 on every accepted event
(including no-ops) so Stripe doesn''t retry. Returns 400 on signature
failure — Stripe surfaces that in the dashboard.'
operationId: stripe_webhook_billing_webhook_post
parameters:
- name: Stripe-Signature
in: header
required: false
schema:
type: string
default: ''
title: Stripe-Signature
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
CreditsResponse:
properties:
balance:
type: integer
title: Balance
ledger_balance:
type: integer
title: Ledger Balance
default: 0
trial_credits_remaining:
type: integer
title: Trial Credits Remaining
default: 0
buckets:
items:
additionalProperties: true
type: object
type: array
title: Buckets
recent_transactions:
items:
additionalProperties: true
type: object
type: array
title: Recent Transactions
type: object
required:
- balance
- buckets
- recent_transactions
title: CreditsResponse
description: Current credit state for /billing/credits.
AutoTopupUpdate:
properties:
enabled:
type: boolean
title: Enabled
threshold:
anyOf:
- type: integer
- type: 'null'
title: Threshold
pack:
anyOf:
- type: string
- type: 'null'
title: Pack
type: object
required:
- enabled
title: AutoTopupUpdate
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
BillingPortalResponse:
properties:
portal_url:
type: string
title: Portal Url
type: object
required:
- portal_url
title: BillingPortalResponse
CheckoutRequest:
properties:
kind:
type: string
title: Kind
target:
type: string
title: Target
surface:
type: string
title: Surface
default: desk
type: object
required:
- kind
- target
title: CheckoutRequest
AutoTopupState:
properties:
eligible:
type: boolean
title: Eligible
enabled:
type: boolean
title: Enabled
threshold:
type: integer
title: Threshold
pack:
type: string
title: Pack
has_card:
type: boolean
title: Has Card
type: object
required:
- eligible
- enabled
- threshold
- pack
- has_card
title: AutoTopupState
description: Operator auto-top-up settings + whether the account can use it.
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
CheckoutResponse:
properties:
checkout_url:
type: string
title: Checkout Url
type: object
required:
- checkout_url
title: CheckoutResponse
TopupRequest:
properties:
pack:
type: string
title: Pack
type: object
required:
- pack
title: TopupRequest
description: 'Top-up checkout — one-time payment for a credit pack.
pack is one of "small" / "medium" / "large" per docs/PRICING.md.'