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

# Create an invoice payment

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

## Request

- Base URL: `https://api.bokio.se/v1`
- URL: `https://api.bokio.se/v1/companies/{companyId}/invoices/{invoiceId}/payments`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/authorize`
    - Client credentials
    - Token URL: `/token` scopes: `invoices:write`

Creates a new payment record for the specified invoice. Use the bookkeepingAccountNumber field to specify an accounting account other than the default account (1930).

**Scope:** `invoices:write`

## Request body

- InvoicePayment
  - `id` string, uuid
  - `invoiceId` string, uuid
  - `date` string, date, required
  - `sumBaseCurrency` number, double, required: The amount of the payment in the base currency. Currently the base currency is always SEK.
  - `bookkeepingAccountNumber` integer, required: The bookkeeping number of the payment account. The value must match a chart of accounts account number that has a payment account details.
  - `journalEntryRef` object, nullable
    - `id` string, uuid

## Response `200`

Payment created successfully

- InvoicePayment
  - `id` string, uuid
  - `invoiceId` string, uuid
  - `date` string, date, required
  - `sumBaseCurrency` number, double, required: The amount of the payment in the base currency. Currently the base currency is always SEK.
  - `bookkeepingAccountNumber` integer, required: The bookkeeping number of the payment account. The value must match a chart of accounts account number that has a payment account details.
  - `journalEntryRef` object, nullable
    - `id` string, uuid

## Other responses

- `400`: Invalid payment data
- `404`: Invoice not found

---

[API](https://skmtc.dev/bokio/apis/company-api.md) - [All operations](https://skmtc.dev/bokio/apis/company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bokio/apis/company-api/revisions/9395020f3da2?raw)
