Skip to main content

Create a new invoice

POST 

https://core-prod.malipopay.co.tz/api/v1/invoice

Creates a new invoice for the project

Request

Bodyrequired

    customerstringrequired

    Customer ID

    Example: 6281559426fa29659c5ac38a
    itemsobject[]required

    Line items on the invoice

    dueDatedaterequired

    Invoice due date

    Example: 2024-03-31
    currencystringrequired

    Currency code

    Example: TZS
    notesstring

    Additional notes or payment instructions

    Example: Payment due within 30 days
    taxRatenumber

    Tax rate as a percentage (e.g., 18 for 18%)

    Example: 18

Responses

Invoice created successfully

Schema
    _idstring
    Example: 64c2de5f1a3b7e9d0f5a2c81
    referencestring

    Unique invoice reference number

    Example: INV-2024-001
    customerstring

    Customer ID

    Example: 6281559426fa29659c5ac38a
    itemsobject[]
    subtotalnumber
    Example: 500000
    taxnumber
    Example: 90000
    totalnumber
    Example: 590000
    currencystring
    Example: TZS
    statusstring

    Invoice status (DRAFT, SENT, PAID, OVERDUE, CANCELLED)

    Example: SENT
    dueDatedate
    Example: 2024-03-31
    notesstring
    Example: Payment due within 30 days
    projectstring
    Example: 63db68a6c5f3e7682e23c2ca
    deletedboolean
    Example: false
    createdAtdate-time
    Example: 2024-03-01T10:00:00.000Z

Authorization: apiToken

name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
curl -L 'https://core-prod.malipopay.co.tz/api/v1/invoice' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
-d '{
"customer": "6281559426fa29659c5ac38a",
"items": [
{}
],
"dueDate": "2024-03-31",
"currency": "TZS",
"notes": "Payment due within 30 days",
"taxRate": 18
}'
Request
Base URL
https://core-prod.malipopay.co.tz
Auth
Body required
{
  "customer": "6281559426fa29659c5ac38a",
  "items": [
    {}
  ],
  "dueDate": "2024-03-31",
  "currency": "TZS",
  "notes": "Payment due within 30 days",
  "taxRate": 18
}
Response

Click the Send API Request button above and see the response here!