inFakt MCP server tool · Invoices: actions
infakt_corrective_invoice_create
Last updated: · Create Corrective Invoice
Creates a corrective invoice for an issued VAT invoice of a saved client (client_id).
What it does
The server’s own text, in Polish, written for the assistant. Names of other tools link to their pages.
Tworzy fakturę korygującą VAT (async).
Limits
- services: pary pozycji z tym samym group (correction=false → przed, correction=true → po)
- payment_method="transfer" → wymagane bank_account i bank_name
- Klient: wymagany 'client_id' klienta zapisanego w inFakt: 1) znajdź go przez infakt_get_clients_list(search=<nazwa firmy>), 2) jeśli go nie ma, najpierw utwórz go przez infakt_create_client, 3) przekaż zwrócone 'id' jako client_id.
- paid_price → kwota zapłacona w groszach (częściowa lub pełna). Dodaj status="paid" przy pełnej zapłacie, aby wydruk pokazał "Zapłacono".
Examples
infakt_meta_examples("create_corrective_invoice") Metody płatności: infakt_meta_dictionary("payment_methods") Powody korekty: infakt_meta_dictionary("correction_reasons")
Related tools (per the server)
- infakt_get_clients_list - lista klientów (źródło client_id)
- infakt_create_client - utworzenie klienta, którego nie ma w inFakt
- infakt_get_invoice - szczegóły faktury korygowanej
- infakt_async_status - status tworzenia faktury
Parameters
Fields of the params object. Types and field descriptions come from the schema the server publishes in tools/list.
| Parameter | Type | Required | Description |
|---|---|---|---|
bank_account | string | no | Numer konta bankowego |
bank_name | string | no | Nazwa banku |
client_id | integer | yes | ID klienta zapisanego w inFakt (z infakt_get_clients_list). Jeśli klienta nie ma, najpierw utwórz go przez infakt_create_client. |
confirmation | boolean | no | Czy klient podpisał potwierdzenie odbioru korekty |
confirmation_token | string | no | Przy pierwszym wywołaniu pozostaw to pole puste, aby otrzymać preview operacji i podpisany token potwierdzenia. Po akceptacji użytkownika wywołaj narzędzie ponownie z identycznym payloadem oraz zwróconym confirmation_token. |
corrected_invoice_number | string | yes | Numer faktury korygowanej (np. "FV/1/01/2024") |
correction_reason | one of: "mistake", "other" | yes | Powód korekty: "mistake" (błąd) lub "other" (inne) |
currency | string | no | Kod waluty (domyślnie PLN) |
invoice_date | date (YYYY-MM-DD) | no | Data wystawienia faktury (RRRR-MM-DD) |
notes | string | no | Dodatkowe uwagi |
paid_price | integer | no | Kwota już zapłacona w groszach |
payment_date | date (YYYY-MM-DD) | no | Termin płatności (RRRR-MM-DD) |
payment_method | one of: "transfer", "cash", "card", "barter", "check", "bill_of_sale", "delivery", "compensation", "accredited", "paypal", "instalment_sale", "payu", "tpay", "przelewy24", "dotpay", "other" | yes | Metoda płatności (przelew, gotówka, karta, itp.) |
sale_date | date (YYYY-MM-DD) | no | Data sprzedaży (RRRR-MM-DD) |
services | list of object (min 2) | yes | Lista pozycji faktury (pary: oryginalna + skorygowana) |
status | one of: "draft", "sent", "printed", "paid" | no | Status faktury: 'draft', 'sent', 'printed' lub 'paid' |
swift | string | no | Kod SWIFT (dla przelewów międzynarodowych) |
vat_exchange_date_kind | one of: "vat", "pit" | no | Rodzaj daty kursu waluty dla VAT. Dotyczy faktur w walucie obcej (currency != PLN). |
vat_exemption_reason | integer | no | ID podstawy zwolnienia z VAT (z infakt_get_vat_exemptions_list). Wymagane gdy konto ma sprzedaż zwolnioną z VAT (vat_sales: "exempt") |
Access kind and annotations
Write with a confirmation token: the first call returns a preview and a token, the second call with that token performs the operation
readOnlyHint: falsewrite: changes data or statedestructiveHint: falsenon-destructive: overwrites or deletes nothingidempotentHint: falsenon-idempotent: each call may add something newopenWorldHint: falseworks only within the inFakt account
OAuth scopes the tool requires:
api:invoices:write
Related tools
- infakt_get_clients_list – Lists and searches clients by name; returns id, uuid and name by default, NIP and contact data only via
fields=. - infakt_create_client – Creates a client with NIP and address; the invoice tools no longer accept buyer data. Returns the
idto use asclient_idon an invoice. - infakt_meta_examples – Example calls for an operation.
- infakt_meta_dictionary – Dictionary of allowed values, e.g. invoice types, payment methods.
- infakt_get_invoice – Details of one invoice of any type.
- infakt_async_status – Status of an async operation, e.g. invoice creation or a KSeF submission.
Changes
- 2026-10: client_id required, inline client data removed