Orb

Orb Credits API

The Credits API from Orb — 4 operation(s) for credits.

GitHub OpenAPI
Business capability
Rating & Charging BC-4250.20

Operations 1

POST /customers/{customer_id}/credits/ledger_entries Create ledger entry #

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/orb-billing:orb-billing-credits-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

orb-billing-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Orb Credits API
  description: Orb is a usage-based billing and metering platform. The REST API ingests timestamped usage events, models customers, plans, prices, items, and billable metrics, manages subscriptions, and automates invoicing, credit ledgers, coupons, alerts, and webhooks. All endpoints are served over HTTPS at https://api.withorb.com/v1 and authenticated with a Bearer API key.
  termsOfService: https://www.withorb.com/legal/terms-of-service
  contact:
    name: Orb Support
    url: https://www.withorb.com
    email: team@withorb.com
  version: '1.0'
servers:
- url: https://api.withorb.com/v1
  description: Orb production API
security:
- bearerAuth: []
tags:
- name: Credits
paths:
  /customers/{customer_id}/credits/ledger_entries:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createLedgerEntry
      tags:
      - Credits
      summary: Create ledger entry
      description: Adds, sets expiry, voids, or amends credits on a customer's ledger.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerEntryCreate'
      responses:
        '201':
          description: The created ledger entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerEntry'
components:
  schemas:
    CreditBlock:
      type: object
      properties:
        id:
          type: string
        balance:
          type: number
        status:
          type: string
          enum:
          - active
          - pending_payment
        effective_date:
          type: string
          format: date-time
          nullable: true
        expiry_date:
          type: string
          format: date-time
          nullable: true
        per_unit_cost_basis:
          type: string
          nullable: true
    LedgerEntry:
      type: object
      properties:
        id:
          type: string
        entry_type:
          type: string
          enum:
          - increment
          - decrement
          - expiration_change
          - credit_block_expiry
          - void
          - void_initiated
          - amendment
        entry_status:
          type: string
          enum:
          - committed
          - pending
        amount:
          type: number
        starting_balance:
          type: number
        ending_balance:
          type: number
        credit_block:
          $ref: '#/components/schemas/CreditBlock'
        description:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
    LedgerEntryCreate:
      type: object
      required:
      - entry_type
      properties:
        entry_type:
          type: string
          enum:
          - increment
          - decrement
          - expiration_change
          - void
          - amendment
        amount:
          type: number
        currency:
          type: string
        effective_date:
          type: string
          format: date-time
        expiry_date:
          type: string
          format: date-time
        per_unit_cost_basis:
          type: string
        description:
          type: string
  parameters:
    CustomerId:
      name: customer_id
      in: path
      required: true
      description: The Orb-generated customer identifier.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Authenticate with an Orb API key sent as a Bearer token in the Authorization header: `Authorization: Bearer <ORB_API_KEY>`.'