WHMCS · Capability

WHMCS API — Billing

WHMCS API — Billing. 3 operations. Lead operation: Create Invoice. Self-contained Naftiko capability covering one Whmcs business surface.

Run with Naftiko WhmcsBilling

What You Can Do

POST
Createinvoice — Create Invoice
/v1/action-createinvoice
POST
Getinvoice — Get Invoice
/v1/action-getinvoice
POST
Getinvoices — Get Invoices
/v1/action-getinvoices

MCP Tools

create-invoice

Create Invoice

get-invoice

Get Invoice

read-only
get-invoices

Get Invoices

read-only

Capability Spec

whmcs-billing.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: WHMCS API — Billing
  description: 'WHMCS API — Billing. 3 operations. Lead operation: Create Invoice. Self-contained Naftiko capability covering
    one Whmcs business surface.'
  tags:
  - Whmcs
  - Billing
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WHMCS_API_KEY: WHMCS_API_KEY
capability:
  consumes:
  - type: http
    namespace: whmcs-billing
    baseUri: https://{your-domain}/includes/api.php
    description: WHMCS API — Billing business capability. Self-contained, no shared references.
    resources:
    - name: ?action=CreateInvoice
      path: /?action=CreateInvoice
      operations:
      - name: createinvoice
        method: POST
        description: Create Invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: ?action=GetInvoice
      path: /?action=GetInvoice
      operations:
      - name: getinvoice
        method: POST
        description: Get Invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: ?action=GetInvoices
      path: /?action=GetInvoices
      operations:
      - name: getinvoices
        method: POST
        description: Get Invoices
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: identifier
      value: '{{env.WHMCS_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: whmcs-billing-rest
    port: 8080
    description: REST adapter for WHMCS API — Billing. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/action-createinvoice
      name: action-createinvoice
      description: REST surface for ?action=CreateInvoice.
      operations:
      - method: POST
        name: createinvoice
        description: Create Invoice
        call: whmcs-billing.createinvoice
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/action-getinvoice
      name: action-getinvoice
      description: REST surface for ?action=GetInvoice.
      operations:
      - method: POST
        name: getinvoice
        description: Get Invoice
        call: whmcs-billing.getinvoice
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/action-getinvoices
      name: action-getinvoices
      description: REST surface for ?action=GetInvoices.
      operations:
      - method: POST
        name: getinvoices
        description: Get Invoices
        call: whmcs-billing.getinvoices
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: whmcs-billing-mcp
    port: 9090
    transport: http
    description: MCP adapter for WHMCS API — Billing. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: create-invoice
      description: Create Invoice
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: whmcs-billing.createinvoice
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-invoice
      description: Get Invoice
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: whmcs-billing.getinvoice
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-invoices
      description: Get Invoices
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: whmcs-billing.getinvoices
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.