{"title":"Create customerPayments","url":"https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/api/dynamics_customerpayment_create/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_customerpayment_create, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_customerpayment_create","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Creates a customer payment object in Dynamics 365 Business Central.","date":"2026-08-21","meta":{"topic":"reference"},"outline":[{"level":2,"title":"HTTP request","slug":"http-request","at":55,"chars":311},{"level":2,"title":"Request headers","slug":"request-headers","at":366,"chars":102},{"level":2,"title":"Request body","slug":"request-body","at":468,"chars":93},{"level":2,"title":"Response","slug":"response","at":561,"chars":130},{"level":2,"title":"Example","slug":"example","at":691,"chars":1163},{"level":2,"title":"Related information","slug":"related-information","at":1854,"chars":322}],"text":"Creates a customer payment object in Business Central.\n## HTTP request\nReplace the URL prefix for Business Central depending on environment following the guideline<../endpoints-apis-for-dynamics>.\n```\nPOST businesscentralPrefix/companies({id})/customerPaymentJournals({id})/customerPayment({id})\nPOST businesscentralPrefix/companies({id})/customerPayments({id})\n```\n## Request headers\nHeader|Value\nAuthorization|Bearer {token}. Required.\nContent-Type|application/json\n## Request body\nIn the request body, supply a JSON representation of customerPayment object.\n## Response\nIf successful, this method returns ```201 Created``` response code and a customerPayment object in the response body.\n## Example\nRequest\nHere's an example of a request.\n```json\nPOST https://{businesscentralPrefix}/api/v2.0/companies({id})/customerPayment\nContent-type: application/json\n\n{\n    \"lineNumber\": 10000,\n    \"customerId\": \"customerId-value\",\n    \"customerNumber\": \"10400\",\n    \"contactId\": \"string\",\n    \"postingDate\": \"2015-12-31\",\n    \"documentNumber\": \"1234\",\n    \"externalDocumentNumber\": \"\",\n    \"amount\": 1500,\n    \"appliesToInvoiceId\": \"appliesToInvoiceId-value\",\n    \"appliesToInvoiceNumber\": \"100000\",\n    \"description\": \"\",\n    \"comment\": \"\",\n    \"lastModifiedDateTime\": \"2017-03-17T19:02:22.043Z\"\n}\n```\nResponse\n```json\nHTTP/1.1 201 Created\nContent-type: application/json\n\n{\n    \"id\": \"17cce948-c6a5-4861-8ff5-30428ed83207\",\n    \"lineNumber\": 10000,\n    \"customerId\": \"customerId-value\",\n    \"customerNumber\": \"10400\",\n    \"contactId\": \"string\",\n    \"postingDate\": \"2015-12-31\",\n    \"documentNumber\": \"1234\",\n    \"externalDocumentNumber\": \"\",\n    \"amount\": 1500,\n    \"appliesToInvoiceId\": \"appliesToInvoiceId-value\",\n    \"appliesToInvoiceNumber\": \"100000\",\n    \"description\": \"\",\n    \"comment\": \"\",\n    \"lastModifiedDateTime\": \"2017-03-17T19:02:22.043Z\"\n}\n```\n## Related information\nTips for working with the APIs<../../../developer/devenv-connect-apps-tips>\nCustomer Payments<../resources/dynamics_customerpayment>\nGet Customer Payments<dynamics_customerpayment_get>\nPatch Customer Payments<dynamics_customerpayment_update>\nDelete Customer Payments<dynamics_customerpayment_delete>"}