openapi: 3.2.0 info: title: Karbonhq Billing API version: v3 contact: name: API Support url: https://developers.karbonhq.com/issues/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://karbonhq.com/terms-of-use/ description: 'Operations tagged Billing across 2 of this provider''s published API definitions: KarbonAPI.json, karbonhq-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.karbonhq.com description: The production API server security: - ApiKeyAuth: [] BearerAuth: [] tags: - name: Billing description: List and view an Invoice and associated line items paths: /v3/Invoices: get: operationId: getInvoices tags: - Billing summary: Gets a list of Invoices parameters: - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' - in: query name: $filter schema: type: string examples: invoiceStatusApproved: value: InvoiceStatus eq 'Approved' summary: Invoices with the status 'Approved' invoiceStatusAwaitingPayment: value: InvoiceStatus eq 'AwaitingPayment' summary: Invoices with the status 'AwaitingPayment' invoiceStatusPaid: value: InvoiceStatus eq 'Paid' summary: Invoices with the status 'Paid' invoiceStatusExported: value: InvoiceStatus eq 'Exported' summary: Invoices with the status 'Exported' invoiceStatusVoided: value: InvoiceStatus eq 'Voided' summary: Invoices with the status 'Voided' description: When this parameter is combined with the URI, this endpoint will return a subset of the Invoices that satisfy the `$filter` expression. The `InvoiceStatus` property supports the `eq` operator. - in: query name: $orderby schema: type: string examples: orderByInvoiceDate: value: InvoiceDate summary: Order results by InvoiceDate, oldest to newest orderByInvoiceDateDesc: value: InvoiceDate desc summary: Order results by InvoiceDate, newest to oldest orderByInvoiceCreatedAt: value: CreatedAt summary: Order results by CreatedAt timestamp, oldest to newest orderByInvoiceCreatedAtDesc: value: CreatedAt desc summary: Order results by CreatedAt timestamp, newest to oldest orderByInvoiceUpdatedAt: value: UpdatedAt summary: Order results by UpdatedAt timestamp, oldest to newest orderByInvoiceUpdatedAtDesc: value: UpdatedAt desc summary: Order results by UpdatedAt timestamp, newest to oldest orderByInvoiceNumber: value: InvoiceNumber summary: Order results by InvoiceNumber, oldest to newest orderByInvoiceNumberDesc: value: InvoiceNumber desc summary: Order results by InvoiceNumber, newest to oldest description: Alter the sort order of the invoice list description: Use the `GET` method on this endpoint to receive a list of Invoices responses: '200': description: Successful Invoices GET operation content: application/json: schema: properties: '@odata.context': type: string example: https://api.karbonhq.com/v3/$metadata#Invoices description: The information about Karbon controllers generating this response. '@odata.count': type: integer example: 10 description: The total number of results values: type: array items: $ref: '#/components/schemas/BillingInvoice' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#Invoices '@odata.count': 1 value: - InvoiceKey: M2dVbCt4RHk InvoiceNumber: KIN-1001 TotalAmountDue: 1607.13 InvoiceTotal: 1607.13 InvoiceSubTotal: 1397.5 InvoiceTaxTotal: 209.63 InvoiceDate: '2023-07-21T00:00:00Z' PaymentDueDate: '2023-07-28T00:00:00Z' UpdatedAt: '2023-07-20T23:52:11Z' CurrencyCode: AUD PaymentInstructions: null InvoiceStatus: AwaitingPayment Client: ClientKey: 2xxnBLyCP4Ts ClientType: Organization Name: Acme Corp AddressLine: 15 Example Street City: Sydney StateProvinceCounty: NSW ZipCode: '4004' Country: Australia EmailAddress: acme@example.com TaxLineItems: - TaxName: GST TaxValue: 209.63 '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' example: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' servers: - url: https://api.karbonhq.com description: The production API server /v3/Invoices/{InvoiceKey}: get: operationId: getInvoiceByKey tags: - Billing summary: Gets a single Invoice parameters: - required: true in: path name: InvoiceKey example: M2dVbCt4RHk schema: type: string description: The Karbon-generated Invoice key - $ref: '#/components/parameters/InvoiceExpandParams' description: Use the `GET` method on this endpoint to receive the details of an Invoice specified using the InvoiceKey. The response includes `InvoiceMagicLink`, a link for the client to pay the invoice through Karbon Payments, and `InvoicePdfUrl`, a link to the rendered invoice PDF. Both are returned once the invoice has been posted or sent. responses: '200': description: Successful Invoice GET operation content: application/json: schema: allOf: - type: object properties: '@odata.context': type: string example: https://api.karbonhq.com/v3/$metadata#Invoices/$entity description: The information about Karbon controllers generating this response. - $ref: '#/components/schemas/BillingInvoiceWithPayment' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#Invoices/$entity InvoiceKey: M2dVbCt4RHk InvoiceNumber: KIN-1001 TotalAmountDue: 1607.13 InvoiceTotal: 1607.13 InvoiceSubTotal: 1397.5 InvoiceTaxTotal: 209.63 InvoiceDate: '2023-07-21T00:00:00Z' PaymentDueDate: '2023-07-28T00:00:00Z' UpdatedAt: '2023-07-20T23:52:11Z' CurrencyCode: AUD PaymentInstructions: Payment due 7 days from invoice date InvoiceStatus: AwaitingPayment InvoiceMagicLink: https://clientportal.karbonhq.com/invoice-link?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... InvoicePdfUrl: /v3/Files?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... Client: ClientKey: 2xxnBLyCP4Ts ClientType: Organization Name: Acme Corp AddressLine: 15 Example Street City: Sydney StateProvinceCounty: NSW ZipCode: '4004' Country: Australia EmailAddress: acme@example.com TaxLineItems: - TaxName: GST TaxValue: 209.63 LineItems: - LineItemKey: string BillableItemEntityKey: string BillableItemType: TimeEntry Description: string Quantity: 0 UnitPrice: string Amount: 0 TaxRate: 0 TaxRateName: string Payments: - PaymentKey: 4n3mrlQPycxn PaymentReference: KPY-001 PaymentType: ManualPayment PaymentDate: '2025-01-07' Amount: 1100.5 '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: UDI Not Found: $ref: '#/components/examples/Invoice_Not_Found' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' servers: - url: https://api.karbonhq.com description: The production API server /v3/Payments: get: operationId: getPayments tags: - Billing summary: Gets a list of Payments parameters: - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' description: Use the `GET` method on this endpoint to receive a list of Payments responses: '200': description: Successful Payments GET operation content: application/json: schema: properties: '@odata.context': type: string example: https://api.karbonhq.com/v3/$metadata#Payments description: The information about Karbon controllers generating this response. '@odata.count': type: integer example: 10 description: The total number of results values: type: array items: $ref: '#/components/schemas/BillingPayment' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#Payments '@odata.count': 1 value: - InvoiceKey: 72dVb4dTRkH PaymentReference: KPY-1000 PaymentType: ManualPayment PaymentDate: '2023-07-28' GrossAmount: 1550.5 PaymentMethod: Check KarbonPayment: CardType: '' CardCountry: null CardFunding: '' PayoutStatus: '' SurchargeAmount: 0 KarbonFeeAmount: 0 KarbonFeeTaxAmount: 0 NetAmount: 0 Client: null '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' example: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' servers: - url: https://api.karbonhq.com description: The production API server /v3/ManualPayments: post: operationId: createManualPayment tags: - Billing summary: Create a manual payment against an Invoice description: Use the `POST` method on this endpoint to create a Manual Payment responses: '201': description: Manual Payment recorded successfully content: application/json: schema: type: object properties: '@odata.context': type: string example: https://api.karbonhq.com/v3/$metadata#Invoices/$entity description: The information about Karbon controllers generating this response. InvoiceKey: type: string example: 2F3pqz88T2hW description: The unique Key of the Invoice which the payment was applied to. PaymentMethod: type: string example: Cash description: The method used to make the payment. PaymentDate: type: string format: date-time example: '2024-06-24T00:00:00Z' description: The date the payment made by the customer. TotalAmount: type: number format: double example: 99.95 description: The amount of the payment Reference: description: An optional reference to include with the payment. oneOf: - type: string maxLength: 250 example: Payment made in cash. - type: 'null' PaymentProcessingKey: type: string example: 2cmDVpGdCp99 description: The unique id of the payment record. example: '@odata.context': https://api-stage.karbonhq.com/v3/$metadata#ManualPayments/$entity InvoiceKey: 2F3pqz88T2hW PaymentMethod: Cash PaymentDate: '2024-06-06T00:00:00Z' TotalAmount: 1100.11 Reference: Cash payment PaymentProcessingKey: 2cmDVpGdCp99 '400': description: Bad request content: application/json: schema: description: The response shown when trying to overpay an invoice type: object properties: Error: type: object properties: Code: type: string description: A code that denotes different types of error under the 400 response code. example: '4002' Message: type: string description: The error message example: An attempt was made to overpay Invoice with [tenantPermaKey=2BzmMRkhbwBT] and [invoicePermaKey=tnl31HQDzRS]. '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' requestBody: description: A manual payment request body required: true content: application/json: schema: required: - InvoiceKey - PaymentMethod - PaymentDate - TotalAmount properties: InvoiceKey: type: string example: tnl31HQDzRS description: The unique key of the Invoice to pay PaymentMethod: type: string example: Cash enum: - Bank Transfer - Direct Debit - Credit Card Online - Credit Card Office - Check - Cash - Other description: The method used to pay the invoice PaymentDate: type: string example: '2024-06-30' description: The date the Payment is to be Recorded using an ISO 8601 datestamp format: date TotalAmount: type: number example: 520.55 description: The amount of the payment in the nominated currency, must be greater than 0 and equal or less than the outstanding due amount on the invoice. format: float minimum: 0.01 Reference: type: string example: Payment in person description: An optional reference to include with the payment. servers: - url: https://api.karbonhq.com description: The production API server /v3/ManualPayments/{ManualPaymentKey}: delete: operationId: deleteManualPayment tags: - Billing summary: Delete a manual payment description: Use the `DELETE` method on this endpoint to delete a Manual Payment parameters: - required: true in: path name: ManualPaymentKey example: 2Rz483jmtvzb schema: type: string description: The Manual Payment key responses: '204': description: No Content '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Manual Payment not found content: application/json: schema: $ref: '#/components/schemas/ManualPaymentNotFoundErrorMessage' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' servers: - url: https://api.karbonhq.com description: The production API server /v3/ReverseManualPayment: post: operationId: reverseManualPayment tags: - Billing summary: Reverse a manual payment description: Use the `POST` method on this endpoint to reverse a Manual Payment responses: '204': description: No Content '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Manual Payment not found content: application/json: schema: $ref: '#/components/schemas/ManualPaymentNotFoundErrorMessage' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' requestBody: description: A reverse manual payment request body required: true content: application/json: schema: required: - PaymentKey - ReversalDate properties: PaymentKey: type: string example: 2NmwhRJXjHdH description: The unique key of the Manual Payment to reverse ReversalDate: type: string format: date-time example: '2025-08-01T00:00:00Z' description: The date the Reversal is to be recorded using an ISO 8601 datestamp servers: - url: https://api.karbonhq.com description: The production API server /v3/Payments/{PaymentKey}: get: operationId: getPaymentByPaymentKey tags: - Billing summary: Gets a single Payment parameters: - in: path name: PaymentKey schema: type: string required: true example: 72dVb4dTRkH description: The unique key of the payment description: Use the `GET` method on this endpoint to receive details of a single Payment responses: '200': description: Successful Payment GET operation content: application/json: schema: allOf: - type: object properties: '@odata.context': type: string example: https://api.karbonhq.com/v3/$metadata#Payments/$entity description: The information about Karbon controllers generating this response. - $ref: '#/components/schemas/BillingPayment' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' example: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' servers: - url: https://api.karbonhq.com description: The production API server /v3/Expenses: post: tags: - Billing summary: Creates a new Expense description: 'Use the `POST` method on this endpoint to create an Expense and associate it with a WorkItem, Contact or Organization in your tenant. Expenses cannot be listed, updated or deleted through the API.' operationId: createExpense responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/ExpenseResponse' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#Expenses/$entity ExpenseKey: 3nB7kQvXLmT Timeline: EntityType: WorkItem EntityKey: 2m6pSFxRzcF2 ExpenseDate: '2026-08-14T00:00:00Z' Value: 240.5 BillableValue: 240.5 Description: Courier fees for year-end documents '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Resource Not Found: $ref: '#/components/examples/HTTP_Resource_Not_Found' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' requestBody: description: Refer to the table below for more information on each field in the request body. required: true content: application/json: schema: $ref: '#/components/schemas/ExpenseRequest' example: Timeline: EntityType: WorkItem EntityKey: 2m6pSFxRzcF2 ExpenseDate: '2026-08-14T00:00:00Z' Value: 240.5 BillableValue: 240.5 Description: Courier fees for year-end documents servers: - url: https://api.karbonhq.com description: The production API server components: examples: Unsupported_option: description: The error returned when the query option in a request is not allowed for by the API value: error: code: '4002' message: Query option '