Create payment entry

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

MCP tool erpnext_write → create_payment_entry

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.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "erpnext_write",
    "arguments": {
      "operation": "create_payment_entry",
      "arguments": {
        "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

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "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
  },
  "isError": false
}

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.