Invoices
Create, send, and manage invoices. Amounts in cents (CAD). Statuses: DRAFTSENTPAIDOVERDUE
GETList invoices
GET/invoices
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Items per page, max 100 (default: 20) |
| search | string | Search in invoice number and title |
| status | string | Filter by DRAFT | SENT | PAID | OVERDUE |
| customerId | string | Filter by customer ID |
| dueAfter | date-time | Filter invoices due after this date |
| dueBefore | date-time | Filter invoices due before this date |
| sort | string | createdAt | -createdAt | dueDate | -dueDate | amount | -amount |
curl "https://paymavo.com/api/v1/invoices?status=SENT&limit=10" \
-H "Authorization: Bearer sk_live_xxx"GETGet an invoice
GET/invoices/{id}
curl https://paymavo.com/api/v1/invoices/clx123 \
-H "Authorization: Bearer sk_live_xxx"POSTCreate an invoice
POST/invoices
| Parameter | Type | Description |
|---|---|---|
| customerId* | string | Customer ID |
| title* | string | Invoice title (max 200 chars) |
| items* | array | Line items — each with description, quantity (int), unitPrice (cents) |
| description | string | Invoice description (max 1000 chars) |
| dueDate | date-time | Payment due date |
| paymentTerms | string | e.g. Net 30 |
| notes | string | Internal notes (max 2000 chars) |
| paymentMethod | string | BANK_TRANSFER | ONLINE_PAYMENT (default: ONLINE_PAYMENT) |
| discountType | string | percentage | fixed |
| discountValue | integer | Discount amount (cents if fixed) |
curl -X POST https://paymavo.com/api/v1/invoices \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"customerId": "clx...",
"title": "Web development — March",
"dueDate": "2026-04-15T00:00:00.000Z",
"items": [
{ "description": "UI design", "quantity": 1, "unitPrice": 300000 },
{ "description": "Development", "quantity": 8, "unitPrice": 25000 }
]
}'PATCHUpdate an invoice
PATCH/invoices/{id}
All fields optional. Cannot update a PAID invoice — returns 409.
curl -X PATCH https://paymavo.com/api/v1/invoices/clx123 \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "dueDate": "2026-05-01T00:00:00.000Z" }'DELETEDelete an invoice
DELETE/invoices/{id}
Returns 204. Cannot delete a PAID invoice.
curl -X DELETE https://paymavo.com/api/v1/invoices/clx123 \
-H "Authorization: Bearer sk_live_xxx"POSTSend an invoice by email
POST/invoices/{id}/send
Generates the PDF and emails it to the customer. Updates status to SENT.
curl -X POST https://paymavo.com/api/v1/invoices/clx123/send \
-H "Authorization: Bearer sk_live_xxx"POSTMark an invoice as paid
POST/invoices/{id}/mark-as-paid
Records paidAt and sets status to PAID.
curl -X POST https://paymavo.com/api/v1/invoices/clx123/mark-as-paid \
-H "Authorization: Bearer sk_live_xxx"POSTDuplicate an invoice
POST/invoices/{id}/duplicate
Creates an identical copy with a new invoice number, status DRAFT, and triggers a new payment link. Returns 201.
curl -X POST https://paymavo.com/api/v1/invoices/clx123/duplicate \
-H "Authorization: Bearer sk_live_xxx"GETGet invoice PDF
GET/invoices/{id}/pdf
Returns the Cloudinary URL of the PDF. Generates and uploads it on first call.
curl "https://paymavo.com/api/v1/invoices/clx123/pdf" \
-H "Authorization: Bearer sk_live_xxx"Docs
Guides
API Reference