---
title: "Create an invoice settlement"
method: POST
path: "/companies/{companyId}/invoices/{invoiceId}/settlements"
tags: ["invoices"]
---

# Create an invoice settlement

`POST /companies/{companyId}/invoices/{invoiceId}/settlements`

Create a settlement for the invoice that will reduce the outstanding amount of the invoice. A negative amount will increase the outstanding amount. For example, in the case of a currency gain.

> 📘 Settlement types that can be created in Bokio API
> - `currency`
> - `bankFee`
> - `paymentServiceFee`

**Scope:** `invoices:write`

## Request body

- InvoiceSettlementWrite
  - `type` 'currency' | 'bankFee' | 'paymentServiceFee', required — The type of the settlement. - Currency adjustments are for changes in exchange rates. Currency gain or currency loss is reflected in `sumBaseCurrency` being positive or negative respectively. - Bank fees are for charges from banks or payment providers. - Payment service fees are for charges from payment service providers (e.g. Stripe). Available for Swedish companies only. Requires `vatScheme` in the settlement details.
  - `invoiceSettlementDetails` union, required — The settlement details specific to the settlement type
    - StandardSettlementDetails
      - `date` string, date, required — The date of the settlement
      - `sumBaseCurrency` number, required — The settlement amount in base currency
    - PaymentServiceFeeSettlementDetails
      - `date` string, date, required — The date of the settlement
      - `sumBaseCurrency` number, required — The settlement amount in base currency. Must be greater than zero.
      - `vatScheme` 'domestic' | 'eu' | 'nonEu' | 'vatExempt', required — The VAT scheme for the payment service fee. Determines how VAT is handled in the bookkeeping. - `domestic` — No reverse charge VAT. The fee is booked as a domestic expense. - `eu` — EU reverse charge. The fee is booked with reverse charge VAT (output VAT on account 2645, input VAT on account 2614). - `nonEu` — Non-EU reverse charge. Same VAT treatment as EU but booked to a different expense account. - `vatExempt` — VAT exempt. The fee is booked as a general administrative expense with no VAT.

## Response `200`

Settlement created successfully

- InvoiceSettlementRead
  - `id` string, uuid — The unique identifier of the settlement
  - `invoiceId` string, uuid — The unique identifier of the invoice this settlement belongs to
  - `type` 'currency' | 'bankFee' | 'badDebt' | 'balanceAdjustment' | 'paymentServiceFee' — The type of the settlement. - Currency adjustments are for changes in exchange rates. Currency gain or currency loss is reflected in `sumBaseCurrency` being positive or negative respectively. - Bank fees are for charges from banks or payment providers. - Bad debts are for uncollectible invoices. - Balance adjustments are for correcting discrepancies on invoices without affecting bookkeeping. - Payment service fees are for charges from payment service providers (e.g. Stripe). Available for Swedish companies only. Supports different VAT schemes for domestic, EU, non-EU, and VAT-exempt transactions.
  - `invoiceSettlementDetails` union — The settlement details specific to the settlement type
    - StandardSettlementDetails
      - `date` string, date, required — The date of the settlement
      - `sumBaseCurrency` number, required — The settlement amount in base currency
    - PaymentServiceFeeSettlementDetails
      - `date` string, date, required — The date of the settlement
      - `sumBaseCurrency` number, required — The settlement amount in base currency. Must be greater than zero.
      - `vatScheme` 'domestic' | 'eu' | 'nonEu' | 'vatExempt', required — The VAT scheme for the payment service fee. Determines how VAT is handled in the bookkeeping. - `domestic` — No reverse charge VAT. The fee is booked as a domestic expense. - `eu` — EU reverse charge. The fee is booked with reverse charge VAT (output VAT on account 2645, input VAT on account 2614). - `nonEu` — Non-EU reverse charge. Same VAT treatment as EU but booked to a different expense account. - `vatExempt` — VAT exempt. The fee is booked as a general administrative expense with no VAT.
  - `journalEntryRef` object, nullable
    - `id` string, uuid

## Other responses

- `400` — Bad request
- `404` — Invoice not found

---

[API](https://skmtc.net/bokio/apis/company-api.md) · [All operations](https://skmtc.net/bokio/apis/company-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bokio/company-api/revisions/1bb5d09ce15e/schema)
