# Create partial payment for document Creates a partial payment for a document. This generates a treasury movement and client current account entry. Use the document numeric id (the same id returned for invoice-type and guide-type resources). The .json suffix requests a JSON response body. Send an Idempotency-Key header to make retries safe: a repeated request with the same key and payload replays the first answer (kept for 24 hours) instead of registering the payment twice. Endpoint: POST /api/v3/documents/{document_id}/partial_payments.json Version: 3.1.0 Security: apiKeyAuth ## Path parameters: - `document_id` (integer, required) The unique identifier of the document. Example: 541674 ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Header parameters: - `Idempotency-Key` (string) Optional client-generated unique key (e.g. a UUID), scoped to the account and the document. Without it, every request registers a new payment. Example: "6f1c2a4e-1b7d-4c55-9a0e-3f2b8d7c9e10" ## Request fields (application/json): - `partial_payment` (object, required) - `partial_payment.amount` (number, required) Example: 150.5 - `partial_payment.payment_date` (string) dd/mm/yyyy Example: "15/01/2024" - `partial_payment.payment_mechanism` (string) Payment mechanism code (e.g. TB, MB, CC). 255-character limit is the database column default. Example: "TB" - `partial_payment.note` (string) Stored in full on the receipt (observations, a text column). The copy on the treasury movement is truncated to 255 characters. If a value still reaches a 255-character column, the API answers 422 The note is too long (maximum 255 characters). Please shorten it and try again. Example: "Payment for invoice 123456" ## Response 200 fields (application/json): - `receipt` (object, required) Example: {"id":256124749,"status":"final","archived":false,"type":"Receipt","sequence_number":"14/INVOICEXPRESSDEMO","inverted_sequence_number":"INVOICEXPRESSDEMO/14","sequence_id":5259454,"date":"30/04/2026","due_date":"30/04/2026","reference":"","observations":"Payment for invoice 123456","retention":null,"permalink":"https://web.invoicexpress.com/documents/256124749625970261deda875ee3e3138ffed1a5437d8dc8b","saft_hash":"jd5I","sum":100,"discount":0,"before_taxes":100,"taxes":23,"total":123,"currency":"Euro","client":{"id":192905674,"name":"teste","email":"client@example.com","country":"Portugal"},"items":[],"atcud":"N/D"} - `receipt.id` (integer) Example: 256124749 - `receipt.status` (string) Example: "final" - `receipt.archived` (boolean) - `receipt.type` (string) Example: "Receipt" - `receipt.sequence_number` (string) Example: "14/INVOICEXPRESSDEMO" - `receipt.inverted_sequence_number` (string) Example: "INVOICEXPRESSDEMO/14" - `receipt.sequence_id` (integer) Example: 5259454 - `receipt.date` (string) dd/mm/yyyy Example: "30/04/2026" - `receipt.due_date` (string) dd/mm/yyyy Example: "30/04/2026" - `receipt.reference` (string) - `receipt.observations` (string) No enforced length limit; stored as a text column. Example: "Payment for invoice 123456" - `receipt.retention` (number,null) - `receipt.permalink` (string) Example: "https://web.invoicexpress.com/documents/256124749625970261deda875ee3e3138ffed1a5437d8dc8b" - `receipt.saft_hash` (string) No enforced character limit (text column). Example: "jd5I" - `receipt.sum` (number) Example: 100 - `receipt.discount` (number) - `receipt.before_taxes` (number) Example: 100 - `receipt.taxes` (number) Example: 23 - `receipt.total` (number) Example: 123 - `receipt.currency` (string) Example: "Euro" - `receipt.client` (object) The receipt's client. id and name are always present; every other field is omitted when blank on the client. Example: {"id":192905674,"name":"teste","email":"client@example.com","country":"Portugal"} - `receipt.client.name` (string, required) Example: "teste" - `receipt.client.email` (string) Example: "client@example.com" - `receipt.client.address` (string) - `receipt.client.postal_code` (string) - `receipt.client.country` (string) Address country. 255-character limit is the database column default, not an explicit validation. Example: "Portugal" - `receipt.client.code` (string) - `receipt.client.city` (string) - `receipt.client.fiscal_id` (string) - `receipt.client.website` (string) - `receipt.client.phone` (string) - `receipt.client.fax` (string) - `receipt.client.observations` (string) - `receipt.items` (array) Example: [] - `receipt.atcud` (string) Example: "N/D" ## Response 409 fields (application/json): - `error` (string)