Creates a credit card entry with its lines.

POST /banking/credit-card-entries

Group: Banking › Credit Card Entries · Operation ID: createCreditCardEntry

The response contains only the new entry's id. Read the record with GET banking/credit-card-entries/:id.

entityId, creditCardAccountId, transactionDate and at least one line are required. Every line amount is a decimal in the entry currency. No line may be zero, and the lines may not sum to zero.

When currency is omitted the account's own currency is used. When supplied it must match the account's, or the call fails with CURRENCY_MISMATCH.

The posting period is resolved across every book the entity posts to. A transaction date whose period is closed, or open in some books and closed in others, fails with POSTING_PERIOD_NOT_OPEN.

attachments names already-uploaded files. On a tenant that requires an attachment, omitting them fails with ATTACHMENT_REQUIRED.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createCreditCardEntryInput.

Field Type Required Description
entityId string yes The legal entity the entry is posted under. See id on GET base/entities.
creditCardAccountId string yes The general-ledger account behind the credit card account this entry posts against. See id on GET accounting/accounts/:id.
transactionDate string (date) yes The date the transaction took place. Use format YYYY-MM-DD. It decides the posting period.
currency string no The currency of the entry. Format ISO 4217, for example 'USD'. It governs every amount on the entry. Omit to use the account's own currency. When supplied it must match the account's currency.
status string no The reconciliation status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'. Defaults to 'Unmatched'.
name string no A short name for the entry.
description string no A free-form description of the entry.
serviceDate string (date) no The date the goods or services were delivered. Use format YYYY-MM-DD.
origin string no The system or process the entry originated from.
externalUrl string no A link to the entry in the originating system.
lines array of object yes The lines of the entry, in the order they appear. At least one is required. No line may be zero, and the lines may not sum to zero.
lines[].accountId string yes The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id.
lines[].amount string (decimal) yes The line amount, as a decimal in the entry currency. It must be non-zero.
lines[].description string no A free-form description of the line.
lines[].departmentId string no The department this line is attributed to. See id on GET departments/:id.
lines[].businessUnitId string no The business unit this line is attributed to. There is no endpoint for it.
lines[].businessPartnerId string no The business partner this line is attributed to. Required when vatPercentage is supplied. There is no endpoint for it.
lines[].lineType string no The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted.
lines[].vatPercentage string (decimal) no The VAT rate applied, as a percentage. For example, 19 means 19%. Supplying it requires businessPartnerId.
lines[].vatAccountId string no The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id.
lines[].reverseVatAccountId string no The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id.
lines[].vatAmount string (decimal) no The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage.
lines[].netAmount string (decimal) no The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT.
attachments array of object no Files to attach to the entry, each naming an already-uploaded file by its id. Required on a tenant configured to require an attachment.
attachments[].fileName string yes The display name of the attached file.
attachments[].fileId string yes The identifier of the already-uploaded file.

Example:

{
  "entityId": "e8dc29b9-7e79-4709-bb32-95938bcb1bd1",
  "creditCardAccountId": "f50164c3-85e3-4dab-986e-3fdb39f8ecc1",
  "transactionDate": "2026-02-14",
  "currency": "USD",
  "status": "unmatched",
  "name": "February bank fees",
  "description": "<description>",
  "serviceDate": "2026-01-15",
  "origin": "<origin>",
  "externalUrl": "<externalUrl>",
  "lines": [
    {
      "accountId": "9994c3ed-f812-44c1-9454-7f36b2bfb0fb",
      "amount": "-125.00",
      "description": "Account maintenance fee",
      "lineType": "oneTime"
    }
  ],
  "attachments": [
    {
      "fileName": "<fileName>",
      "fileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ]
}

Response

200 Success

Under data (createCreditCardEntryOutput):

Field Type Required Description
id string yes The unique identifier for the created credit card entry.

Response headers

Errors

Code Status
REFERENCE_NOT_FOUND 400
INVALID_FIELD_VALUE 400
POSTING_PERIOD_NOT_OPEN 400
CURRENCY_MISMATCH 400
ACCOUNT_ENTITY_MISMATCH 400
GROUPING_ACCOUNT_NOT_ALLOWED 400
BUSINESS_PARTNER_REQUIRED_FOR_VAT 400
NO_LINES 400
ZERO_LINE_AMOUNT 400
ZERO_TOTAL_AMOUNT 400
ATTACHMENT_REQUIRED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses