Create payment entry

Saves a draft Receive payment entry allocated to one or more invoices.

POST https://cotlet.dev/api/v1/erpnext/payment-entries

write Confirm

Saves a Payment Entry with the payment type Receive, the customer as party, the Mode of Payment, the bank Reference No and Reference Date, and the invoices it pays under References. A draft does not post to the General Ledger; call submit_payment_entry for that. If the amount is larger than the invoices, the remainder stays as an unallocated advance. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_payment_entry
NameTypeDescription
party string required string Customer ID from list_customers.
paid_amount number required number Amount received, in the currency of the bank account.
mode_of_payment string string Mode of Payment name from your site.
posting_date string string YYYY-MM-DD. Default: today.
reference_no string string Bank or cheque reference.
reference_date string string Date on the bank reference, YYYY-MM-DD.
invoices array array Sales Invoice IDs to allocate the payment to, oldest due date first.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/erpnext/payment-entries \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"party":"Northwind Studio","paid_amount":1650,"mode_of_payment":"Wire Transfer","posting_date":"2026-10-14","reference_no":"WIRE-88213","reference_date":"2026-10-13","invoices":["ACC-SINV-2026-00042"]}'
Python
result = client.call("erpnext", "create_payment_entry", {"party":"Northwind Studio","paid_amount":1650,"mode_of_payment":"Wire Transfer","posting_date":"2026-10-14","reference_no":"WIRE-88213","reference_date":"2026-10-13","invoices":["ACC-SINV-2026-00042"]})
Node.js
const result = await cotlet.call('erpnext', 'create_payment_entry', {"party":"Northwind Studio","paid_amount":1650,"mode_of_payment":"Wire Transfer","posting_date":"2026-10-14","reference_no":"WIRE-88213","reference_date":"2026-10-13","invoices":["ACC-SINV-2026-00042"]});
CLI
cotlet call erpnext create_payment_entry --data '{"party":"Northwind Studio","paid_amount":1650,"mode_of_payment":"Wire Transfer","posting_date":"2026-10-14","reference_no":"WIRE-88213","reference_date":"2026-10-13","invoices":["ACC-SINV-2026-00042"]}'

Example response

JSON

{
  "payment_entry": "ACC-PAY-2026-00021",
  "payment_type": "Receive",
  "party": "Northwind Studio",
  "status": "Draft",
  "docstatus": 0,
  "posting_date": "2026-10-14",
  "paid_amount": 1650,
  "mode_of_payment": "Wire Transfer",
  "reference_no": "WIRE-88213",
  "reference_date": "2026-10-13",
  "allocated_to": [
    {
      "invoice": "ACC-SINV-2026-00042",
      "allocated_amount": 1650
    }
  ],
  "unallocated_amount": 0
}

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.