Create invoice
mercoa_create_invoiceWRITE — creates a real invoice/bill in Mercoa. Set status (DRAFT to stage, NEW to submit), amount, currency, payer/vendor, dates and line items. POST /invoice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Total invoice amount. | |
| status | No | Invoice status, e.g. DRAFT, NEW, APPROVED, SCHEDULED. | |
| dueDate | No | Due date (ISO 8601). | |
| payerId | No | Payer entity ID (who owes). | |
| currency | No | Currency code, e.g. USD. | |
| metadata | No | Arbitrary key/value metadata. | |
| vendorId | No | Vendor entity ID (who is paid). | |
| lineItems | No | Line items array, e.g. [{ "amount": 100, "currency": "USD", "description": "Product A", "quantity": 1, "unitPrice": 100 }]. | |
| noteToSelf | No | Internal note. | |
| invoiceDate | No | Invoice date (ISO 8601). | |
| creatorUserId | No | User ID creating the invoice. | |
| deductionDate | No | Scheduled payment/deduction date (ISO 8601). | |
| invoiceNumber | No | Human-readable invoice number, e.g. INV-123. | |
| creatorEntityId | No | Entity ID on whose behalf the invoice is created. | |
| paymentSourceId | No | Payment method ID to pay from (payer's). | |
| paymentDestinationId | No | Payment method ID to pay to (vendor's). |