Payments received

Money received from customers and how it is applied to invoices.

Paths are relative to https://evenbooks.org/api/v1. How keys, errors, paging and versions work is in the guide; the whole reference is also an OpenAPI 3.1 document.

Administrator key marks endpoints that need a key with the admin role, Write access those a read-only key can’t call, and Idempotent those that accept an idempotency key.

Take a payment off an invoice

post/allocations/{id}/reverse
Write accessIdempotent

Reverses one allocation (an amount of a payment applied to an invoice): the invoice owes that amount again and the money is unapplied on the payment. Posts to the books on date (default: the date it was applied); refused in a locked period (409 period_locked). Only payment allocations; credit note allocations are refused (400 validation). Returns the payment.

Parameters

  • idstring (uuid)path · required

Request body

ReverseAllocationInput

Response 200

PaymentDto (fields under Schemas)

Errors 400 · 401 · 403 · 404 · 409 · 429

List payments received

get/payments

Newest first unless sort and dir say otherwise. unappliedOnly keeps payments with money not yet applied to invoices; q searches the reference and memo. Each payment includes its allocations (amounts applied to invoices).

Parameters

  • limitintegerquery

    1–200 · default 50

  • cursorstring · PageCursorquery
  • sortstringquery

    One of: date amount customer unapplied

  • dirstring · SortDirectionquery

    One of: asc desc

  • contactIdstring · Uuidquery
  • fromstring · PlainDateStringquery
  • tostring · PlainDateStringquery
  • statusstringquery

    One of: posted void

  • unappliedOnlyboolean · QueryBooleanquery
  • qstringquery

    up to 200 characters

Response 200

A page of PaymentDto ({ items, nextCursor, total }, see paging).

Errors 400 · 401 · 403 · 404 · 409 · 429

Record a payment received

post/payments
Write accessIdempotent

Posts money received into depositAccountId (a bank account or Undeposited Funds) and applies the allocations to the customer’s invoices; whatever is not applied stays on the payment as credit to apply later with POST /payments/{id}/allocate. Allocations cannot exceed the amount (400 over_allocation) and must all be invoices of one customer. bankTransactionId matches the payment to an unreviewed bank deposit of the same amount in that account. Refused in a locked period (409 period_locked).

Request body

CreatePaymentInput

  • contactIdstring · Uuid or null
  • datestring · PlainDateStringrequired
  • amountstring · PositiveDecimalStringrequired
  • methodstring

    One of: cash check card ach wire other

    default "other"

  • referencestring or null

    up to 100 characters

  • memostring or null

    up to 1000 characters

  • depositAccountIdstring · Uuidrequired
  • isRefundableDepositboolean

    default false

  • allocationsarray of PaymentAllocationInput

    up to 100 items · default []

    Show 2 fields of each item
  • bankTransactionIdstring · Uuid or null
  • idempotencyKeystring · IdempotencyKey

Response 200

PaymentDto (fields under Schemas)

Errors 400 · 401 · 403 · 404 · 409 · 429

Get a payment received

get/payments/{id}

Includes its allocations (amounts applied to invoices) and what is still unapplied or refunded.

Parameters

  • idstring (uuid)path · required

Response 200

PaymentDto (fields under Schemas)

Errors 400 · 401 · 403 · 404 · 409 · 429

Apply a payment to invoices

post/payments/{id}/allocate
Write accessIdempotent

Applies money left on a payment to invoices, lowering their balances, and posts that to the books on date (default: the payment date). The total cannot exceed the unapplied amount (400 over_allocation). Send version from your last read (409 version_conflict); refused on a void payment (409 invalid_state) or in a locked period (409 period_locked).

Parameters

  • idstring (uuid)path · required

Request body

AllocatePaymentInput

Response 200

PaymentDto (fields under Schemas)

Errors 400 · 401 · 403 · 404 · 409 · 429

Void a payment received

post/payments/{id}/void
Write accessIdempotent

Cancels a payment by posting a reversing entry on date (default: the payment date); a matched bank line goes back to unreviewed. Refused while any of it is applied to invoices or refunded (409 invalid_state): reverse the allocations with POST /allocations/{id}/reverse and void the refunds first. Payments collected online cannot be voided; refund them instead. Needs version from your last read; refused in a locked period (409 period_locked).

Parameters

  • idstring (uuid)path · required

Request body

VoidPaymentInput

Response 200

PaymentDto (fields under Schemas)

Errors 400 · 401 · 403 · 404 · 409 · 429

Schemas

The types these endpoints take or return, by name. Type names above link here.

AllocationDto

  • idstring
  • sourceTypestring

    One of: payment credit_note

  • paymentIdstring or null
  • creditNoteIdstring or null
  • invoiceIdstring
  • invoiceNumberstring or nulloptional
  • amountstring · DecimalString
  • datestring · PlainDateString
  • statusstring

    One of: active reversed

  • journalEntryIdstring or null
  • reversalJournalEntryIdstring or null
  • sourceLabelstringoptional

DecimalString

decimal string

string

up to 32 characters · pattern ^-?\d+(\.\d+)?$

IdempotencyKey

string

8–128 characters

NonNegativeDecimalString

string

up to 32 characters · pattern ^\d+(\.\d+)?$

PageCursor

string

up to 2000 characters

PaymentAllocationInput

PaymentDto

  • idstring
  • contactIdstring or null
  • contactNamestring or nulloptional
  • datestring · PlainDateString
  • currencystring
  • amountstring · DecimalString
  • methodstring
  • referencestring or null
  • memostring or null
  • depositAccountIdstring
  • depositAccountNamestringoptional
  • isRefundableDepositboolean
  • statusstring

    One of: posted void

  • amountAllocatedstring · DecimalString
  • amountRefundedstring · DecimalString
  • unappliedAmountstring · DecimalString
  • journalEntryIdstring
  • voidJournalEntryIdstring or null
  • voidReasonstring or null
  • bankTransactionIdstring or null
  • processorChargeIdstring or null
  • allocationsarray of AllocationDto
  • versioninteger
  • createdAtstring

PlainDateString

string

pattern ^\d{4}-\d{2}-\d{2}$

PositiveDecimalString

string

QueryBoolean

boolean

SortDirection

string

One of: asc desc

Uuid

string (uuid)