biterp

reverse_payable_payment

Referência da tool reverse_payable_payment do MCP Server do bitERP (Contas a pagar).

Reverse Payable Payment · Contas a pagar

Somente leituraDestrutivaIdempotenteMundo aberto
NãoSimSimNão

Descrição

A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.

UNDOES a payment settled manually or by a payment gateway (Stripe): soft-deletes the transaction and its allocation, leaving NO trace in the statement. Undoing a gateway one diverges from the provider balance; confirm with the user. Not for bank statement lines (Open Finance): use remove_payable_allocation. If the money left and came back, use reverse_payable_settlement, which keeps both lines. Not for credit card statements (type card_statement): their payment is unlinked only in the bitERP web app (CARD_STATEMENT_UNDO_USE_STATEMENT_FLOW).

Parâmetros

ParâmetroTipoObrigatórioDescrição
tenantstringSimDefines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely.
payable_idstring (UUID)SimThe payable ID
transaction_idstring (UUID)SimThe settlement transaction ID to undo

Resposta

O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).

CampoTipoDescrição
payableobject—
payable.idstring (UUID)—
payable.tenant_idstring (UUID)—
payable.record_numberinteger—
payable.supplier_idstring (UUID) ou null—
payable.supplierobject ou null—
payable.financial_account_idstring (UUID)—
payable.financial_accountobject ou null—
payable.payment_method_idstring (UUID) ou null—
payable.payment_methodobject ou null—
payable.financial_category_idstring (UUID) ou null—
payable.financial_categoryobject ou null—
payable.account_scope_maskobject—
payable.purchase_invoice_idstring (UUID) ou null—
payable.purchase_invoiceobject ou null—
payable.parent_payable_idstring (UUID) ou null—
payable.parentobject ou null—
payable.statement_payable_idstring (UUID) ou null—
payable.typestringValores: standard, interest, fine, bank_fee, refund, chargeback, card_statement.
payable.reference_codestring ou null—
payable.statusstringValores: pending, partial, paid, overdue, cancelled.
payable.amountstring—
payable.discount_amountstring—
payable.surcharge_amountstring—
payable.issue_datestring (date)—
payable.due_datestring (date)—
payable.paid_atstring (date-time) ou null—
payable.installment_group_idstring (UUID) ou null—
payable.installment_numberinteger ou null—
payable.installment_countinteger ou null—
payable.descriptionstring ou null—
payable.notesstring ou null—
payable.metadataobject—
payable.created_by_user_idstring (UUID) ou null—
payable.updated_by_user_idstring (UUID) ou null—
payable.deleted_by_user_idstring (UUID) ou null—
payable.created_atstring (date-time)—
payable.updated_atstring (date-time)—
payable.deleted_atstring (date-time) ou null—
payable.remaining_amountstring—
payable.settlementsarray de objetos—
payable.hidden_settlementsarray de objetos—
payable.charge_titlesarray de objetos—
payable.offsetsarray de objetos—
payable.reversible_manual_paymentsarray de objetos—
reversed_transaction_idstring (UUID)—
removed_allocation_idstring (UUID)—
financial_account_idstring (UUID)—
_tenantobject—
_tenant.idstring (UUID)—
_tenant.slugstring—
_tenant.company_namestring—

Exemplo de chamada

Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "reverse_payable_payment",
        "arguments": {
            "tenant": "minha-empresa",
            "payable_id": "<uuid>",
            "transaction_id": "<uuid>"
        }
    }
}

Nesta página