API Reference

Complete API documentation for the Billing.net MCP Server.

Base URL: https://billing.net/api

Quick Links

Core Endpoints

Invoices

  • POST /api/v1/invoices - Create invoice (with Stripe integration!)
  • GET /api/v1/invoices - List invoices
  • GET /api/v1/invoices/{id} - Get invoice

Expenses

  • POST /api/v1/expenses - Record expense
  • GET /api/v1/expenses - List expenses

Payouts

  • POST /api/v1/payouts - Request payout
  • GET /api/v1/payouts - List payouts

Providers

  • GET /api/v1/providers - List all 37 providers
  • GET /api/v1/providers/{name}/health - Check credentials
  • POST /api/v1/providers/{name}/test - Test operations

MCP

  • GET /api/manifest.json - MCP tool discovery

Interactive Documentation

Visit https://billing.net/api/docs for interactive Swagger UI with live testing.

Authentication

All write operations require API key:

curl -X POST https://billing.net/api/v1/invoices \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer_email": "test@example.com", "items": [...]}'

Example: Create Invoice with Stripe

curl -X POST https://billing.net/api/v1/invoices \
  -H "x-api-key: devkey_12345" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "alice@example.com",
    "currency": "usd",
    "items": [{
      "description": "Pro Plan - Monthly",
      "quantity": 1,
      "unit_amount": 4900
    }]
  }'

When STRIPE_API_KEY is configured, this creates:

  1. Invoice in Billing.net database
  2. Customer in Stripe (if new)
  3. Invoice in Stripe with line items
  4. Returns both IDs for tracking

Response:

{
  "id": 1,
  "customer_email": "alice@example.com",
  "currency": "usd",
  "status": "open",
  "total": 4900,
  "created_at": "2025-10-24T00:00:00Z"
}

For complete documentation, see the Full API Reference.