Apply Payment to Invoice
Applies a payment to an open invoice, matched by invoice number and client.
Authentication: X-API-KEY header (see Authentication).
Request body
| Field | Type | Description |
|---|---|---|
| invoiceNumber | string | Invoice number to apply the payment to. |
| clientName | string | Client name. |
| date | date | Payment date. |
| amount | number | Payment amount. |
| paymentType | enum | PaymentProviderType (see Enums). |
| referenceNumber | string | External reference number. |
| memo | string | Memo / 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
}
]
}