Hyperline Invoices API

The Invoices API from Hyperline — 6 operation(s) for invoices.

Documentation

Specifications

Other Resources

OpenAPI Specification

hyperline-invoices-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Hyperline Billable Events Invoices API
  description: The Hyperline API follows REST principles and uses JSON-encoded request and response payloads. It powers usage-based billing and subscription management for B2B SaaS - covering customers, products and plans, subscriptions, billable event ingestion, invoices, payments, credit notes, and webhooks. The full machine-readable specification is published by Hyperline at https://api.hyperline.co/openapi.
  termsOfService: https://www.hyperline.co/legal/terms
  contact:
    name: Hyperline Support
    url: https://docs.hyperline.co
  version: '1.0'
servers:
- url: https://api.hyperline.co/v1
  description: Production
- url: https://sandbox.api.hyperline.co/v1
  description: Sandbox
security:
- bearerAuth: []
tags:
- name: Invoices
paths:
  /invoices:
    get:
      operationId: listInvoices
      tags:
      - Invoices
      summary: List invoices
      responses:
        '200':
          description: A list of invoices.
    post:
      operationId: createInvoice
      tags:
      - Invoices
      summary: Create an invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
      responses:
        '201':
          description: The created invoice.
  /invoices/{id}:
    get:
      operationId: getInvoice
      tags:
      - Invoices
      summary: Retrieve an invoice
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The requested invoice.
    patch:
      operationId: updateInvoice
      tags:
      - Invoices
      summary: Update an invoice
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The updated invoice.
  /invoices/{id}/charge:
    post:
      operationId: chargeInvoice
      tags:
      - Invoices
      summary: Charge an invoice
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The charged invoice.
  /invoices/{id}/void:
    post:
      operationId: voidInvoice
      tags:
      - Invoices
      summary: Void an invoice
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The voided invoice.
  /invoices/{id}/credit-notes:
    post:
      operationId: createCreditNote
      tags:
      - Invoices
      summary: Issue a credit note against an invoice
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '201':
          description: The created credit note.
  /invoices/{id}/download:
    get:
      operationId: downloadInvoice
      tags:
      - Invoices
      summary: Download an invoice PDF
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The invoice document.
components:
  schemas:
    Invoice:
      type: object
      properties:
        id:
          type: string
        customer_id:
          type: string
        status:
          type: string
        currency:
          type: string
        total:
          type: integer
  parameters:
    IdParam:
      name: id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Authenticate with your Hyperline API key passed as a bearer token in the Authorization header - `Authorization: Bearer <API_KEY>`.'