Invoices

Create, send, and manage invoices. Amounts in cents (CAD). Statuses: DRAFTSENTPAIDOVERDUE

GETList invoices

GET/invoices
ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page, max 100 (default: 20)
searchstringSearch in invoice number and title
statusstringFilter by DRAFT | SENT | PAID | OVERDUE
customerIdstringFilter by customer ID
dueAfterdate-timeFilter invoices due after this date
dueBeforedate-timeFilter invoices due before this date
sortstringcreatedAt | -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
ParameterTypeDescription
customerId*stringCustomer ID
title*stringInvoice title (max 200 chars)
items*arrayLine items — each with description, quantity (int), unitPrice (cents)
descriptionstringInvoice description (max 1000 chars)
dueDatedate-timePayment due date
paymentTermsstringe.g. Net 30
notesstringInternal notes (max 2000 chars)
paymentMethodstringBANK_TRANSFER | ONLINE_PAYMENT (default: ONLINE_PAYMENT)
discountTypestringpercentage | fixed
discountValueintegerDiscount 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"