eva crm Public API

Payments

Record a payment against a contract and match it to invoices by number or id.

A payment is a receipt on the contract's ledger. Recording one gives it a number and, if you say which invoices it pays, matches it to them straight away; otherwise it sits unallocated until you match it.

POST Record a payment

POST/v1/contracts/{id}/payments

Records a payment on the contract through the CRM's own receipt writer: it gets the next receipt number and the contract's balances are recalculated, as if a member of staff had recorded it. This is not idempotent: send it twice and two payments are recorded, so check the ledger before retrying a failed call.

Path parameters
idstring · uuidRequired

The contract's id.

Request bodyapplication/json
amountnumberRequired

What was received, including VAT. Greater than 0.

receivedDatestring · date or date-time

Read in your timezone.

Default: today
paymentMethodstring

A payment method's id or name, from GET /v1/invoices/types.

referencestring · max 255

Free text. Used as the description when no description is sent.

descriptionstring · max 500

Free text.

invoicesstring[] · max 50

Invoice ids or numbers on this contract to match, in the order to fill them. Left out, the payment sits unallocated.

typestring

Only if your organisation has more than one receipt type: its id or name.

Matching fills invoices in the order given, each up to its outstanding balance, until the payment is used up. The CRM decides the amounts, so per-invoice amounts are not accepted.

Responses
201
The payment in the ledger shape, with `allocations` showing what it was matched to and `amounts.balance` what is left unallocated.
404
No such contract in your organisation.
422
A field is wrong, or an invoice is not on this contract, not raised, or already paid. `fields` names the offender and nothing is written.
502
The CRM did not answer. Nothing was written; repeat the request.
Example request
curl https://api.evacrm.co.uk/v1/contracts/6c99094a-6f2e-4c7d-9b1e-2b4a8f3c1d05/payments \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "receivedDate": "2026-09-02",
    "paymentMethod": "BACS",
    "reference": "Bank ref 88213",
    "invoices": ["INV000189"]
  }'
Example response · 201
{
  "id": "3a1f0c92-7d4e-4b8a-9c21-5e6f7a8b9c0d",
  "number": "REC000191",
  "kind": "payment",
  "type": { "id": "b0c1d2e3-f4a5-4b6c-8d7e-9f0a1b2c3d4e", "name": "Receipt" },
  "status": "matched",
  "description": "Bank ref 88213",
  "dateRaised": "2026-09-02T00:00:00.000+01:00",
  "receivedDate": "2026-09-02T00:00:00.000+01:00",
  "dueDate": null,
  "amounts": { "net": 416.67, "vat": 83.33, "vatRate": 20, "gross": 500, "balance": 0, "allocated": 500 },
  "paymentMethod": { "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f", "name": "BACS" },
  "contract": { "id": "6c99094a-6f2e-4c7d-9b1e-2b4a8f3c1d05", "code": "CON000561" },
  "allocations": [
    { "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60", "amount": 500, "with": { "id": "e3f4a5b6-c7d8-4e9f-0a1b-2c3d4e5f6071", "number": "INV000189", "kind": "invoice" }, "createdAt": "2026-09-02T10:14:03.512+01:00" }
  ],
  "items": [],
  "exported": false,
  "exportedAt": null,
  "createdAt": "2026-09-02T10:14:03.512+01:00",
  "updatedAt": "2026-09-02T10:14:03.512+01:00"
}

GET Get a payment

GET/v1/payments/{id}

One payment, in the ledger shape. For a receipt PDF, see download a PDF: it works for payments too.

Path parameters
idstring · id or numberRequired

The payment's id, or its number such as REC000191.

Responses
200
The payment.
404
Nothing with that id or number, or it is not a payment.
409
More than one entry carries that number. `candidates` lists their ids; use one of them.
Example request
curl https://api.evacrm.co.uk/v1/payments/REC000191 \
  -H "Authorization: Bearer sk_..."
Example response · 200
{
  "id": "3a1f0c92-7d4e-4b8a-9c21-5e6f7a8b9c0d",
  "number": "REC000191",
  "kind": "payment",
  "type": {
    "id": "…",
    "name": "Receipt"
  },
  "status": "matched",
  "description": "Bank ref 88213",
  "dateRaised": "2026-09-02T00:00:00.000+01:00",
  "receivedDate": "2026-09-02T00:00:00.000+01:00",
  "dueDate": null,
  "amounts": {
    "net": 416.67,
    "vat": 83.33,
    "vatRate": 20,
    "gross": 500,
    "balance": 0,
    "allocated": 500
  },
  "paymentMethod": {
    "id": "…",
    "name": "BACS"
  },
  "contract": {
    "id": "6c99094a-6f2e-4c7d-9b1e-2b4a8f3c1d05",
    "code": "CON000561"
  },
  "allocations": [
    {
      "id": "…",
      "amount": 500,
      "with": {
        "id": "e3f4a5b6-c7d8-4e9f-0a1b-2c3d4e5f6071",
        "number": "INV000189",
        "kind": "invoice"
      },
      "createdAt": "2026-09-02T10:14:03.512+01:00"
    }
  ],
  "items": [],
  "exported": false,
  "exportedAt": null,
  "createdAt": "2026-09-02T10:14:03.512+01:00",
  "updatedAt": "2026-09-02T10:14:03.512+01:00"
}

POST Allocate a payment

POST/v1/payments/{id}/allocations

Matches a payment's remaining balance to invoices, in the order given, each up to its outstanding balance. Unmatching is not available through the API; staff can remove an allocation in the CRM.

Path parameters
idstring · id or numberRequired

The payment's id or number.

Request bodyapplication/json
invoicesstring[] · 1 to 50Required

Invoice ids or numbers on the payment's contract, in the order to fill them.

Responses
201
The updated payment, with its new `allocations` and `amounts.balance`.
404
No such payment.
422
The payment is fully allocated, or an invoice is not on its contract, not raised, or already paid. `fields` says which.
502
The CRM did not answer. Nothing was written; repeat the request.
Example request
curl https://api.evacrm.co.uk/v1/payments/REC000191/allocations \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "invoices": ["INV000189", "BAL000190"] }'
Example response · 201
{
  "id": "3a1f0c92-7d4e-4b8a-9c21-5e6f7a8b9c0d",
  "number": "REC000191",
  "kind": "payment",
  "type": {
    "id": "…",
    "name": "Receipt"
  },
  "status": "matched",
  "description": "Bank ref 88213",
  "dateRaised": "2026-09-02T00:00:00.000+01:00",
  "receivedDate": "2026-09-02T00:00:00.000+01:00",
  "dueDate": null,
  "amounts": {
    "net": 416.67,
    "vat": 83.33,
    "vatRate": 20,
    "gross": 500,
    "balance": 0,
    "allocated": 500
  },
  "paymentMethod": {
    "id": "…",
    "name": "BACS"
  },
  "contract": {
    "id": "6c99094a-6f2e-4c7d-9b1e-2b4a8f3c1d05",
    "code": "CON000561"
  },
  "allocations": [
    {
      "id": "…",
      "amount": 300,
      "with": {
        "id": "…",
        "number": "INV000189",
        "kind": "invoice"
      },
      "createdAt": "2026-09-02T10:14:03.512+01:00"
    },
    {
      "id": "…",
      "amount": 200,
      "with": {
        "id": "…",
        "number": "BAL000190",
        "kind": "invoice"
      },
      "createdAt": "2026-09-03T09:20:44.101+01:00"
    }
  ],
  "items": [],
  "exported": false,
  "exportedAt": null,
  "createdAt": "2026-09-02T10:14:03.512+01:00",
  "updatedAt": "2026-09-02T10:14:03.512+01:00"
}

On this page