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

Parameters: record_payment
NameTypeDescription
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
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}'
Python
result = client.call("ifirma", "record_payment", {"invoice_id":1,"amount":1})
Node.js
const result = await cotlet.call('ifirma', 'record_payment', {"invoice_id":1,"amount":1});
CLI
cotlet call ifirma record_payment --data '{"invoice_id":1,"amount":1}'

Example response

JSON

{
  "invoice_id": 7020104,
  "amount": 800,
  "remaining": 0,
  "status": "paid"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.