Skip to content

app.payments

TableRow level security on

Payments made to or received from a counterparty. Applications spread a payment over invoices; a payment is never applied beyond its amount.

Primary key: id

Columns of app.payments
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from the counterparty on insert. For a person payee it is the paying org, which must engage the person as an individual; never changed.References app.organizations.id
counterparty_iduuidYesCounterparty paid or paying; NULL when the payee is a person engaged as an individual.References app.counterparties.id
directionapp.money_directionNoPayable (we pay) or Receivable (we are paid).
amount_minorbigintNoAmount in minor units of currency_code.
currency_codecharacter(3)NoISO 4217 currency of the payment.References private.currencies.currency_code
paid_ondateNoDate the money moved.
reference_identifiertextYesBank or card reference of the movement.
payment_stateapp.payment_stateNoPayment state. Changes only through the payment RPCs.
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
payee_person_iduuidYesPerson paid as an individual. Exactly one of counterparty_id and payee_person_id is set.References app.people.id