PubFi Credit Auto Reload Routes API

The credit_auto_reload_routes API from PubFi — 3 operation(s) for credit_auto_reload_routes.

GitHub OpenAPI

Operations 4

GET /v1/billing-accounts/{billing_account_id}/credit-auto-reload Get the Credit auto-reload policy #
PUT /v1/billing-accounts/{billing_account_id}/credit-auto-reload Replace the Credit auto-reload policy #
POST /v1/billing-accounts/{billing_account_id}/credit-auto-reload/payment-method-setups Create an auto-reload payment-method setup #
GET /v1/billing-accounts/{billing_account_id}/credit-auto-reload/payment-method-setups/{setup_id} Get an auto-reload payment-method setup #

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/pubfi-ai:pubfi-ai-credit-auto-reload-routes-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

pubfi-ai-credit-auto-reload-routes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pubfi-api-server-runtime Credit Auto Reload Routes API
  description: Shared implementation for PubFi API and operational binaries.
  contact:
    name: PubFi
    url: https://pubfi.ai/contact
    email: hello@pubfi.ai
  license:
    name: GPL-3.0
    identifier: GPL-3.0
  version: 0.3.21
servers:
- url: https://api.pubfi.ai
tags:
- name: credit_auto_reload_routes
paths:
  /v1/billing-accounts/{billing_account_id}/credit-auto-reload:
    get:
      tags:
      - credit_auto_reload_routes
      summary: Get the Credit auto-reload policy
      operationId: get_credit_auto_reload
      parameters:
      - name: billing_account_id
        in: path
        description: Billing account id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Authoritative provider-neutral Credit auto-reload state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationCreditAutoReloadView'
        '403':
          description: Human account membership required
        '404':
          description: Billing account not found
        '409':
          description: Credit auto-reload state, payment method, terms, or authorization conflict
        '503':
          description: Credit auto-reload integration unavailable
      security:
      - pubfiBearer: []
    put:
      tags:
      - credit_auto_reload_routes
      summary: Replace the Credit auto-reload policy
      operationId: replace_credit_auto_reload
      parameters:
      - name: billing_account_id
        in: path
        description: Billing account id
        required: true
        schema:
          type: string
      - name: Idempotency-Key
        in: header
        description: Caller-owned immutable policy replacement identity
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceCreditAutoReloadBody'
        required: true
      responses:
        '200':
          description: Current immutable Credit auto-reload policy revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationCreditAutoReloadView'
        '400':
          description: Invalid strict policy replacement
        '403':
          description: Human Owner or Admin membership required
        '404':
          description: Billing account or offer not found
        '409':
          description: Credit auto-reload state, payment method, terms, or authorization conflict
        '503':
          description: Credit auto-reload integration unavailable
      security:
      - pubfiBearer: []
  /v1/billing-accounts/{billing_account_id}/credit-auto-reload/payment-method-setups:
    post:
      tags:
      - credit_auto_reload_routes
      summary: Create an auto-reload payment-method setup
      operationId: create_credit_auto_reload_payment_method_setup
      parameters:
      - name: billing_account_id
        in: path
        description: Billing account id
        required: true
        schema:
          type: string
      - name: Idempotency-Key
        in: header
        description: Caller-owned payment-method setup identity
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditAutoReloadPaymentMethodSetupBody'
        required: true
      responses:
        '201':
          description: Payment-method setup created or exactly replayed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethodSetup'
        '202':
          description: Provider setup creation is identified but requires authoritative reconciliation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethodSetup'
        '400':
          description: Invalid strict payment-method setup request
        '403':
          description: Human Owner or Admin membership required
        '404':
          description: Billing account or terms not found
        '409':
          description: Credit auto-reload state, payment method, terms, or authorization conflict
        '503':
          description: Credit auto-reload integration unavailable
      security:
      - pubfiBearer: []
  /v1/billing-accounts/{billing_account_id}/credit-auto-reload/payment-method-setups/{setup_id}:
    get:
      tags:
      - credit_auto_reload_routes
      summary: Get an auto-reload payment-method setup
      operationId: get_credit_auto_reload_payment_method_setup
      parameters:
      - name: billing_account_id
        in: path
        description: Billing account id
        required: true
        schema:
          type: string
      - name: setup_id
        in: path
        description: Opaque PubFi payment-method setup id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Authoritative provider-neutral payment-method setup
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethodSetup'
        '400':
          description: Invalid setup id or query
        '403':
          description: Human account membership required
        '404':
          description: Payment-method setup not found
        '409':
          description: Credit auto-reload state, payment method, terms, or authorization conflict
        '503':
          description: Credit auto-reload integration unavailable
      security:
      - pubfiBearer: []
components:
  schemas:
    ReplaceCreditAutoReloadBody:
      type: object
      required:
      - enabled
      properties:
        accepted_terms_hash:
          type:
          - string
          - 'null'
        accepted_terms_version:
          type:
          - string
          - 'null'
        catalog_release_hash:
          type:
          - string
          - 'null'
        enabled:
          type: boolean
        monthly_limit_usd:
          type:
          - string
          - 'null'
        offer_key:
          type:
          - string
          - 'null'
        purchase_credits:
          type:
          - string
          - 'null'
        threshold_credits:
          type:
          - string
          - 'null'
    IntegrationCreditAutoReloadPolicyStatus:
      type: string
      description: Current effective auto-reload policy state.
      enum:
      - disabled
      - active
      - payment_method_required
      - payment_action_required
      - payment_failed
      - monthly_limit_reached
      - reauthorization_required
      - payment_exception
    IntegrationServiceCreditTerms:
      type: object
      description: Immutable customer-facing service-credit terms identity.
      required:
      - meterKey
      - version
      - contentHash
      - url
      properties:
        contentHash:
          type: string
          description: SHA-256 of the canonical immutable terms content.
        meterKey:
          type: string
          description: Canonical meter governed by this immutable terms stream.
        url:
          type: string
          description: Versioned HTTPS terms URL.
        version:
          type: string
          description: Merchant-owned immutable terms version.
      additionalProperties: false
    CreateCreditAutoReloadPaymentMethodSetupBody:
      type: object
      required:
      - acceptedTermsVersion
      - acceptedTermsHash
      properties:
        acceptedTermsHash:
          type: string
        acceptedTermsVersion:
          type: string
      additionalProperties: false
    IntegrationCreditAutoReloadPolicy:
      type: object
      description: Current account-scoped Credit auto-reload policy.
      required:
      - id
      - revision
      - enabled
      - status
      - meterKey
      - thresholdCredits
      - purchaseCredits
      - monthlyLimitUsd
      - offerKey
      - authorizationFingerprint
      - terms
      - createdAt
      properties:
        acceptedAt:
          type:
          - string
          - 'null'
          description: RFC 3339 acceptance time for an enabled revision; absent for a disabled revision.
        authorizationFingerprint:
          type: string
          description: Canonical economic and legal authorization fingerprint.
        createdAt:
          type: string
          description: RFC 3339 revision creation time.
        enabled:
          type: boolean
          description: Whether this exact revision authorizes future payment submissions.
        id:
          type: string
          description: Stable PubFi-owned policy identity.
        meterKey:
          type: string
          description: Merchant meter bound to the reserved service-Credit terms stream.
        monthlyLimitUsd:
          type: string
          description: Required finite UTC calendar-month automatic-purchase limit.
        offerKey:
          type: string
          description: Merchant offer selected by the customer.
        purchaseCredits:
          type: string
          description: Fixed whole-Credit quantity bought by each automatic purchase.
        revision:
          type: integer
          format: int64
          description: Immutable policy revision.
        status:
          $ref: '#/components/schemas/IntegrationCreditAutoReloadPolicyStatus'
          description: Current effective policy state.
        terms:
          $ref: '#/components/schemas/IntegrationServiceCreditTerms'
          description: Exact accepted terms identity.
        thresholdCredits:
          type: string
          description: Strict Credit-balance trigger. Evaluation starts below this value.
      additionalProperties: false
    IntegrationAutoReloadPaymentMethodSetup:
      type: object
      description: One provider-hosted reusable payment-method setup.
      required:
      - id
      - externalAccountRef
      - status
      - createdAt
      properties:
        completedAt:
          type:
          - string
          - 'null'
          description: RFC 3339 terminal time, when terminal.
        createdAt:
          type: string
          description: RFC 3339 setup creation time.
        externalAccountRef:
          type: string
          description: Opaque source-scoped account reference.
        id:
          type: string
          description: PubFi-owned setup identity.
        paymentMethod:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethod'
            description: Activated display-safe method after authoritative verification.
        setupExpiresAt:
          type:
          - string
          - 'null'
          description: RFC 3339 exclusive capability expiry while active.
        setupUrl:
          type:
          - string
          - 'null'
          description: Provider-hosted HTTPS capability while active.
        status:
          $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethodSetupStatus'
          description: Current setup lifecycle.
      additionalProperties: false
    IntegrationAutoReloadAttempt:
      type: object
      description: Most recent automatic payment-attempt projection.
      required:
      - id
      - purchaseId
      - amountUsd
      - status
      - createdAt
      properties:
        amountUsd:
          type: string
          description: Exact attempted amount in fixed-scale USD.
        completedAt:
          type:
          - string
          - 'null'
          description: RFC 3339 terminal time, when terminal.
        createdAt:
          type: string
          description: RFC 3339 attempt creation time.
        id:
          type: string
          description: PubFi-owned automatic attempt identifier.
        purchaseId:
          type: string
          description: Purchase created for this attempt.
        reasonCode:
          type:
          - string
          - 'null'
          description: Stable display-safe failure or pause reason.
        status:
          $ref: '#/components/schemas/IntegrationAutoReloadAttemptStatus'
          description: Attempt lifecycle.
      additionalProperties: false
    IntegrationCreditAutoReloadView:
      type: object
      description: Complete provider-neutral account auto-reload read model.
      required:
      - externalAccountRef
      - meterKey
      - creditBalance
      - generatedAt
      properties:
        creditBalance:
          type: string
          description: Authoritative available Credit balance for the service-Credit meter.
        externalAccountRef:
          type: string
          description: Opaque source-scoped account reference.
        generatedAt:
          type: string
          description: RFC 3339 authoritative observation time.
        lastAttempt:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/IntegrationAutoReloadAttempt'
            description: Most recent automatic attempt.
        meterKey:
          type: string
          description: Canonical service-credit meter for this balance and policy surface.
        monthlyWindow:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/IntegrationAutoReloadMonthlyWindow'
            description: Current UTC monthly window when a policy exists.
        paymentMethod:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethod'
            description: Current display-safe reusable payment method.
        policy:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/IntegrationCreditAutoReloadPolicy'
            description: Current policy, or null before the first explicit configuration.
      additionalProperties: false
    IntegrationAutoReloadPaymentMethodStatus:
      type: string
      description: Reusable payment-method lifecycle.
      enum:
      - active
      - action_required
    IntegrationAutoReloadAttemptStatus:
      type: string
      description: Automatic payment-attempt lifecycle.
      enum:
      - prepared
      - submitting
      - processing
      - ambiguous
      - succeeded
      - failed
      - action_required
      - payment_exception
    IntegrationAutoReloadPaymentMethod:
      type: object
      description: Display-safe reusable payment-method projection.
      required:
      - paymentProfileId
      - brand
      - last4
      - expiresMonth
      - expiresYear
      - status
      properties:
        brand:
          type: string
          description: Display-safe card brand supplied by the provider.
        expiresMonth:
          type: integer
          format: int32
          description: Card expiration month.
          minimum: 0
        expiresYear:
          type: integer
          format: int32
          description: Four-digit card expiration year.
          minimum: 0
        last4:
          type: string
          description: Display-safe final four digits.
        paymentProfileId:
          type: string
          description: Provider-neutral PubFi payment-profile identifier.
        status:
          $ref: '#/components/schemas/IntegrationAutoReloadPaymentMethodStatus'
          description: Current provider-neutral profile state.
      additionalProperties: false
    IntegrationAutoReloadMonthlyWindow:
      type: object
      description: One UTC calendar-month automatic-purchase limit projection.
      required:
      - startsAt
      - resetsAt
      - settledUsd
      - reservedUsd
      - remainingUsd
      properties:
        remainingUsd:
          type: string
          description: Exact amount still available under the finite monthly limit.
        reservedUsd:
          type: string
          description: Exact unresolved automatic spend reservation in fixed-scale USD.
        resetsAt:
          type: string
          description: Exclusive RFC 3339 UTC next-month boundary.
        settledUsd:
          type: string
          description: Exact settled automatic spend in fixed-scale USD.
        startsAt:
          type: string
          description: Inclusive RFC 3339 UTC month start.
      additionalProperties: false
    IntegrationAutoReloadPaymentMethodSetupStatus:
      type: string
      description: Reusable payment-method setup lifecycle.
      enum:
      - creating
      - active
      - ambiguous
      - completed
      - expired
      - failed
      - payment_exception
  securitySchemes:
    pubfiBearer:
      type: http
      scheme: bearer
      bearerFormat: PubFi API key or native session credential
      description: 'Send a PubFi API key or dashboard token as Authorization: Bearer <token>.'
externalDocs:
  description: PubFi Developers policy for /v1 stability, deprecation, and Sunset
  url: https://pubfi.ai/developers.md
x-pubfi-registry-generation:
  epoch_id: epoch-ef987cf7-5944-5f55-871d-b04c93b0c839
  id: generation-310-278c8584fe59d2bed841be54a3aa450fa79029f06447516552991c84ecf749f8
  sequence: 310
  codec: canonical_json_v1
  payload_hash: 206cd96e93b9f4dfda64387c5fa1623cf71e5517ebfc3e66264733dc72580c9a
x-pubfi-registry-manifest:
  registry_epoch_id: epoch-ef987cf7-5944-5f55-871d-b04c93b0c839
  manifest_sequence: 5437
  manifest_payload_hash: c55ca050b52133b27771476ffea88ed8dbab59a76d87d421f41ad4baecd8bb55
x-pubfi-registered-openapi-sources:
- source_key: alternative-fng
  source_revision: 4
  successor_sha256: d903baed44cbb642f0ff34735b07fbb2129e31ffa22aa076b4753a4f813d474f
  content_sha256: 1b30a5865467194c13e2af98a011882f5f9f8f2fe64209ca658196c31ab3539c
  canonical_json:
    externalDocs:
      url: https://alternative.me/crypto/fear-and-greed-index/
    info:
      title: Alternative.me
      version: live-reference
    openapi: 3.1.0
    paths:
      /fng:
        get:
          description: Get the latest data of the Fear and Greed Index.
          parameters:
          - description: 'Limit the number of returned results. The default value is ''1'', use ''0'' for all available data. Please note that the field "time_until_update" will only be returned for the latest value ( in other words: when the value ''1'' is used).'
            in: query
            name: limit
            required: false
            schema:
              type: integer
          - description: Choose to either receive the data part formatted as regular JSON or formatted as CSV for easy pasting in spreadsheets, use either 'json' or 'csv' respectively. The default is 'json'.
            in: query
            name: format
            required: false
            schema:
              type: string
          - description: Choose to either receive the date part formatted for the United States (MM/DD/YYYY), for China and Korea (YYYY/MM/DD) or for the rest of the world (DD/MM/YYYY). Use 'us', 'cn', 'kr' or 'world' respectively. The default is an empty string which will return the date in unixtime, unless format is set to 'csv'. When "format" is set to 'csv' the default "date_format" is 'world'.
            in: query
            name: date_format
            required: false
            schema:
              type: string
          responses:
            '200':
              content:
                application/json:
                  schema: {}
              description: Upstream response
          x-pubfi-upstream-trailing-slash: true


# --- truncated at 32 KB (5627 KB total) ---
# Full source: https://artifacts.apis.io/pubfi-ai/openapi/pubfi-ai-credit-auto-reload-routes-api-openapi.yml