Skip to main content

Apply Payment to Invoice

POST /public/action/payment/create

Applies a payment to an open invoice, matched by invoice number and client.

Authentication: X-API-KEY header (see Authentication).

Request body

FieldTypeDescription
invoiceNumberstringInvoice number to apply the payment to.
clientNamestringClient name.
datedatePayment date.
amountnumberPayment amount.
paymentTypeenumPaymentProviderType (see Enums).
referenceNumberstringExternal reference number.
memostringMemo / note.

Request

curl -X POST https://api.withmoxie.com/public/action/payment/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"invoiceNumber": "E-2026-042", "clientName": "Acme Kft.", "date": "2026-08-05", "amount": 1270.00, "paymentType": "BANK_TRANSFER"}'

Response

Returns the updated InvoiceMini reflecting the applied payment.

{
"id": "66b0f2a1c3a9e40012ab34cd",
"invoiceNumber": 1042,
"invoiceNumberFormatted": "E-2026-042",
"clientId": "66b0f2a1c3a9e40012ab3400",
"status": "PAID",
"currency": "HUF",
"total": 1270.00,
"paymentTotal": 1270.00,
"amountDue": 0.00,
"payments": [
{
"amount": 1270.00,
"date": "2026-08-05",
"paymentType": "BANK_TRANSFER",
"referenceNumber": null,
"memo": null
}
]
}