I’m having some issues with creating a Payment Entry via REST API. I know my credentials are correct and are properly passing to the system as I have tested them by creating other documents. However, with Payment entry, I keep getting the following error:
{
“exception”: “frappe.exceptions.ValidationError: Account: Bank Account Name is not permitted under Payment Entry”,
“exc_type”: “ValidationError”,
“exc_source": “erpnext (app)”,
“exc”: "["Traceback (most recent call last):\n File \“apps/frappe/frappe/app.py\”, line 115, in application\n response = frappe.api.handle(request)\n File \“apps/frappe/frappe/api/init.py\”, line 50, in handle\n data = endpoint(**arguments)\n File \“apps/frappe/frappe/api/v1.py\”, line 46, in create_doc\n return frappe.new_doc(doctype, **data).insert()\n File \“apps/frappe/frappe/model/document.py\”, line 309, in insert\n self.run_before_save_methods()\n File \“apps/frappe/frappe/model/document.py\”, line 1140, in run_before_save_methods\n self.run_method(\“validate\”)\n File \“apps/frappe/frappe/model/document.py\”, line 1011, in run_method\n out = Document.hook(fn)(self, *args, **kwargs)\n File \“apps/frappe/frappe/model/document.py\”, line 1371, in composer\n return composed(self, method, *args, **kwargs)\n File \“apps/frappe/frappe/model/document.py\”, line 1353, in runner\n add_to_return_value(self, fn(self, *args, **kwargs))\n File \“apps/frappe/frappe/model/document.py\”, line 1008, in fn\n return method_object(*args, **kwargs)\n File \“apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py\”, line 89, in validate\n self.set_missing_values()\n File \“apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py\”, line 477, in set_missing_values\n acc = get_account_details(self.paid_to, self.posting_date, self.cost_center)\n File \“apps/frappe/frappe/utils/typing_validations.py\”, line 32, in wrapper\n return func(*args, **kwargs)\n File \“apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py\”, line 2724, in get_account_details\n frappe.throw((\“Account: {0} is not permitted under Payment Entry\”).format(account))\n File \“apps/frappe/frappe/init.py\”, line 609, in throw\n msgprint(\n File \“apps/frappe/frappe/init.py\”, line 574, in msgprint\n _raise_exception()\n File \“apps/frappe/frappe/init.py\”, line 525, in _raise_exception\n raise exc\nfrappe.exceptions.ValidationError: Account: Chase Checking - Chase is not permitted under Payment Entry\n"]”,
“_server_messages”: “[“{\“message\”: \“Account: Chase Checking - Chase is not permitted under Payment Entry\”, \“title\”: \“Message\”, \“indicator\”: \“red\”, \“raise_exception\”: 1, \”__frappe_exc_id\“: \“36c35cbebad80febe650a86c0ffd4ee12bfc06ab8f0b13d154d6ef39\”}”]”
}
I checked what the error means and it’s basically verifying if the user has permissions to interact with the Bank Account. I have used the Admin account credentials for testing, as well as a test user and I still cannot figure out how to solve this.
Any help will be greatly appreciated 