Developer

Integrate invoicing into your own product

The Mocha QuickBill API lets your application create invoices, manage the products and customers behind them, and email a finished invoice to your customer. Two headers to authenticate, JSON in and JSON out, over plain REST.

What you can build

Products & Services

Create the products and services your invoices bill against, list them a page at a time, or read any single one back by its id.

Customers

Create the customer records your invoices are issued against, with their billing and shipping addresses, then read them back to reuse on an invoice.

Invoices & Payments

Raise invoices from your own application, read them back with their line items and addresses, and record the payments that settle them — in full or in part.

Email

Send an invoice out to your customer over email straight from your backend, with your own recipient list.

Everything you need on one page

Every endpoint in the reference lists its request fields, a runnable sample in your language, and the exact response your integration will get back.

API reference/Products & units/Create a product-unit
Preview
POST/v1/product-units

Create a product-unit

Add a new billable product-unit to your account. Once created, it can be referenced by SKU on any invoice line item.

Body parameters

namestringRequired
Display name shown on invoices and in your catalog — e.g. Light package.
skustringRequired
Unique identifier you'll reference on line items. Must be unique across your account.
unit_priceintegerRequired
Base price in the smallest currency unit (e.g. cents). Line items can override this per invoice.
currencystring
ISO 4217 code. Defaults to your account's default currency.
descriptionstring
Optional line-item description that appears on invoices under the product name.
curl -X POST \
  https://api.mocha.co/v1/product-units \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Light package",
    "sku": "pkg_light",
    "unit_price": 4900,
    "currency": "USD",
    "description": "Starter tier — 5 seats"
  }'
Response200 OK · 148ms
{
  "id": "pu_light_pkg",
  "name": "Light package",
  "sku": "pkg_light",
  "unit_price": 4900,
  "currency": "USD",
  "description": "Starter tier — 5 seats",
  "created_at": "2026-08-06T14:32:11Z"
}

Need a hand with your integration?

Send us the endpoint you are calling, the request body and the response you received — our team will take it from there.