write_invoice
write_invoice
Create one-off invoices line by line, finalize, pay, credit, refund and send
Live server: test server (test.mcp.solvimon.com) only.
Creates and manages invoices, payments and payment schedules. Solvimon generates invoices automatically at the end of each billing period. Use create for one-off manual invoices.
Actions by resource type:
invoices:create,add_line,delete_line,update,pay,refund,credit,archive,send_by_emailpayments:authorize,refundpayment_schedules:create,update,activate,cancel,pause
One-off invoice. create with a type, customer_id and billing_currency makes an empty DRAFT invoice on hold. Add lines with add_line: a fixed amount is FIXED with fixed_amount, a unit price is FLAT with amount and volume. delete_line takes the line id. Both work on DRAFT invoices only and return the new totals.
Finalize with update and {"on_hold": false, "status": "FINAL"}. This assigns a permanent invoice number; after that the invoice can only be credited, so confirm first.
pay and refund need a PSP integration. send_by_email needs a Mailgun or SendGrid integration. credit issues a credit note against a finalized invoice.