Record payment
Record a payment received on an invoice.
POST https://cotlet.dev/api/v1/ifirma/invoices/{invoice_id}/payments
write Confirm
Adds a payment to one invoice. The amount cannot be more than what is still owed on it. For a foreign-currency invoice or a cash-method invoice, the payment date is required. iFirma then shows the invoice as paid or partly paid. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
| amount number required | number | Amount received, at most the amount still owed. |
| date string | string | YYYY-MM-DD the money arrived. Required for foreign-currency and cash-method invoices. |
Request
curl -X POST https://cotlet.dev/api/v1/ifirma/invoices/1/payments \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":1}' result = client.call("ifirma", "record_payment", {"invoice_id":1,"amount":1}) const result = await cotlet.call('ifirma', 'record_payment', {"invoice_id":1,"amount":1}); cotlet call ifirma record_payment --data '{"invoice_id":1,"amount":1}' Example response
{
"invoice_id": 7020104,
"amount": 800,
"remaining": 0,
"status": "paid"
}