Bewary Billing API

The Billing API from Bewary — 4 operation(s) for billing.

Operations 6

POST /v1/billing/checkout Start a Stripe Checkout for a prepaid credit pack #
POST /v1/billing/portal Open the Stripe Customer Portal #
GET /v1/billing/settings Auto top-up and the low-balance email (signed-in account) #
PUT /v1/billing/settings Change auto top-up or the low-balance email (signed-in account) #
POST /v1/billing/card Save a card for auto top-up (Stripe Checkout, setup mode) #
DELETE /v1/billing/card Forget the saved card and turn auto top-up off #

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/bewary:bewary-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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bewary-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bewary Billing API
  description: 'Scam intelligence for apps and AI agents: links, domains, IPs, phone numbers, SMS short codes, emails, wallets, bank accounts (IBAN), mobile apps and payment handles, each with a typed verdict, facts and reason codes. Contract: https://bewary.app/docs. Pricing: https://bewary.app/pricing.'
  version: 1.9.0
servers:
- url: https://api.bewary.app
security:
- bearer: []
- apiKey: []
- {}
tags:
- name: Billing
paths:
  /v1/billing/checkout:
    post:
      tags:
      - Billing
      summary: Start a Stripe Checkout for a prepaid credit pack
      description: A Checkout URL for one pack (api_billing.py). The credits are added when Stripe confirms the payment.
      operationId: startCheckout
      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/CheckoutIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/billing/portal:
    post:
      tags:
      - Billing
      summary: Open the Stripe Customer Portal
      description: Receipts and invoices of past packs.
      operationId: openBillingPortal
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/billing/settings:
    get:
      tags:
      - Billing
      summary: Auto top-up and the low-balance email (signed-in account)
      operationId: getBillingSettings
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: The settings, the saved card and the last top-up.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSettings'
        '401':
          description: 'unauthorized: missing, revoked or wrong key, or an option that needs a key'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'degraded_unavailable: a needed source is down; retry later'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
      - Billing
      summary: Change auto top-up or the low-balance email (signed-in account)
      description: 'Auto top-up is off unless turned on here, and needs a saved card. When a call takes the balance under

        `threshold` it buys `pack` once with the saved card; it buys again only after the balance has been back at or over

        the threshold. The low-balance email is sent the same way, once per crossing.'
      operationId: updateBillingSettings
      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/BillingSettingsIn'
      responses:
        '200':
          description: The settings after the change.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSettings'
        '400':
          description: invalid_input or unsupported_type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 'unauthorized: missing, revoked or wrong key, or an option that needs a key'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'degraded_unavailable: a needed source is down; retry later'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/billing/card:
    post:
      tags:
      - Billing
      summary: Save a card for auto top-up (Stripe Checkout, setup mode)
      description: A Checkout URL that saves a card; nothing is charged. The card is stored by Stripe, never by Bewary.
      operationId: saveCard
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    delete:
      tags:
      - Billing
      summary: Forget the saved card and turn auto top-up off
      operationId: dropCard
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    AutoTopup:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Off by default. Needs a saved card (POST /v1/billing/card).
          default: false
        pack:
          anyOf:
          - type: string
            enum:
            - pack_20
            - pack_100
            - pack_500
            - pack_2000
          - type: 'null'
          title: Pack
          description: The pack bought each time.
        threshold:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Threshold
          description: Buy when a call takes the balance under this many credits. Below the pack's credits.
      type: object
      title: AutoTopup
    BillingSettingsIn:
      properties:
        auto_topup:
          anyOf:
          - $ref: '#/components/schemas/AutoTopup'
          - type: 'null'
        low_balance_email:
          anyOf:
          - $ref: '#/components/schemas/LowBalanceEmail'
          - type: 'null'
      type: object
      title: BillingSettingsIn
    LowBalanceEmail:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: On by default; sent once each time the balance falls under the threshold after having been at or over it.
          default: true
        threshold:
          type: integer
          minimum: 0.0
          title: Threshold
          default: 2000
      type: object
      title: LowBalanceEmail
    CardInfo:
      properties:
        brand:
          anyOf:
          - type: string
          - type: 'null'
          title: Brand
        last4:
          anyOf:
          - type: string
          - type: 'null'
          title: Last4
      type: object
      title: CardInfo
    ErrorDetail:
      properties:
        code:
          type: string
          enum:
          - invalid_input
          - unsupported_type
          - unauthorized
          - forbidden
          - quota_exceeded
          - rate_limited
          - not_found
          - input_too_large
          - internal
          - degraded_unavailable
          - gone
          title: Code
        message:
          type: string
          title: Message
        request_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Request Id
      type: object
      required:
      - code
      - message
      title: ErrorDetail
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
      - error
      title: ErrorResponse
    BillingSettings:
      properties:
        auto_topup:
          $ref: '#/components/schemas/AutoTopup'
        low_balance_email:
          $ref: '#/components/schemas/LowBalanceEmail'
        card:
          anyOf:
          - $ref: '#/components/schemas/CardInfo'
          - type: 'null'
          description: The saved card for auto top-up, or null.
        last_top_up:
          anyOf:
          - $ref: '#/components/schemas/LastTopUp'
          - type: 'null'
      type: object
      required:
      - auto_topup
      - low_balance_email
      title: BillingSettings
    CheckoutIn:
      properties:
        pack:
          type: string
          title: Pack
          description: 'The prepaid credit pack: pack_20 ($20, 10,000 credits), pack_100 ($100, 60,000 credits), pack_500 ($500, 375,000 credits), pack_2000 ($2,000, 2,000,000 credits). Credits never expire.'
      type: object
      required:
      - pack
      title: CheckoutIn
    LastTopUp:
      properties:
        status:
          type: string
          enum:
          - pending
          - processing
          - succeeded
          - failed
          title: Status
        pack:
          type: string
          title: Pack
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
          description: Stripe's decline code when it failed, e.g. card_declined.
        created_at:
          type: string
          title: Created At
        finished_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Finished At
      type: object
      required:
      - status
      - pack
      - created_at
      title: LastTopUp
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, bw_…
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key