Choose what you allow. Your choice applies on every tracken.ee address and you can change it any time with “Cookie settings” in the footer.

Remember your cookie choice, language and theme. Without them the site doesn't work the way you chose.

A cookie with your choice (6 months); language and theme in browser storage.


The services below learn that you visited this site, whether you came from their ad and whether you then created a Tracken account. That shows us which ads work, and these companies may show you Tracken ads later. They may link the data to your account with them. For Meta, Tracken ID's server reports the new account and also sends a hash of your e-mail address, your IP address and browser details.

ServiceCookiesKept for up to
Meta (Facebook, Instagram)_fbp, _fbc90 days

Tracken's own visit counter uses no cookies, stores no IP addresses and shares nothing with anyone. Privacy policy

Skip to content
Beta
BetaThe Tracken Accounts API is in beta: it may still change before v1, and every change is announced in the changelog.

PaymentInput

Request

A payment to record, and the document it settles.

Sent in requests. Its values are closed: anything not listed is refused.

Attributes

12
datestring (date)required

Payment date; it sets the accounting period of the posting.

directionPaymentDirectionrequired

Money in (a customer pays a sales invoice, a supplier refunds a purchase) or out (a purchase invoice is paid, a customer is refunded). Named, never implied by a sign.

One of incoming, outgoing

amountstringrequireddecimal string

The money that moved, positive, in currency. In the document's currency it is at most what is still due on the document and equals the allocation's amount.

methodPaymentRecordMethodrequired

How it was paid: bank_transfer posts to the bank account's ledger account, cash to the organization's default cash account.

One of bank_transfer, cash

allocationsarray of PaymentAllocationInputrequiredat most 1 items

The one document this payment settles.

3 attributes of each item
document_typestringrequired

Kind of document settled.

One of sales_invoice, purchase_invoice

document_idstring (uuid)required

The document settled.

amountstringrequireddecimal string

Amount applied to the document, positive, in the document's currency. When the payment is in the document's currency it equals the payment's amount; a payment in another currency (a euro bank payment of a dollar invoice) settles this much of the document.

currencystring · nullable

Currency of amount, the money that moved (ISO 4217): that of the bank or cash account. Defaults to the document's currency.

bank_account_idstring (uuid) · nullable

For bank_transfer: the bank account it moved on; defaults to the organization's default bank account. Not sent with cash.

contact_idstring (uuid) · nullable

The document's contact; another is refused.

referencestring · nullableat most 255 characters

Bank reference or receipt number.

notesstring · nullableat most 2000 characters

Free text.

transaction_idstring (uuid) · nullable

An imported transaction (origin: import, posted by no document) that already books this payment: the payment is linked to it and nothing is posted. Its receivable (sales) or payable (purchase) lines must carry the amount in the payment's direction beyond the payments already linked to it in that direction (400 PAYMENT_TRANSACTION_NOT_LINKABLE otherwise).

Details

It is already linked (409 PAYMENT_TRANSACTION_LINKED) when those payments cover all it carries in that direction, or when a payment of this invoice is linked to it. A linked payment may be a refund (direction against the document's) and may settle a credit note. On an invoice brought over too (origin import or opening) the linked payment is recorded whatever the invoice's approval state: it records money that already moved and pays nothing out. A live invoice's payment, linked or not, needs its approval (APPROVAL_*). A caller holding ledger:write and invoices:write can record history that never passes approval; approval guards money going out, not booked history. On a document in another currency the payment is in the book currency (amount the euros that moved, the allocation what it settled) or in the document's (the journal's bank lines are then the euros), and is the transaction's only payment. Its rate and book figures are the app's own settlement when the journal booked exactly that (its receivable or payable the book value released, its bank the euros), else read off the journal; refused (400 PAYMENT_TRANSACTION_NOT_LINKABLE) when the journal cannot be read as the payment's booking.

external_refstring · nullableat most 200 characters

Your own id for this record (from the system you migrate from or sync with), unique per organization and resource.

Used by