POST
/
api
/
web
/
invoice
/
create-invoice
Create Invoice
curl --request POST \
  --url https://api.billclap.com/api/web/invoice/create-invoice \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "type": "<string>",
  "issue_date": "<string>",
  "due_date": "<string>",
  "receive_amount": 123,
  "party_detail": {
    "party_detail.party_name": "<string>",
    "party_detail.mobile_no": "<string>",
    "party_detail.gst_no": "<string>",
    "party_detail.address": "<string>",
    "party_detail.city": "<string>",
    "party_detail.state": "<string>",
    "party_detail.country": "<string>",
    "party_detail.pin_code": "<string>"
  },
  "product_details": [
    {
      "product_details.0.product_name": "<string>",
      "product_details.0.product_sell_price": 123,
      "product_details.0.product_sell_price_tax_type": "<string>",
      "product_details.0.product_gst": 123,
      "product_details.0.product_hsn": "<string>",
      "product_details.0.product_quantity": 123
    }
  ],
  "additional_charges": [
    {
      "additional_charges.0.chargeName": "<string>",
      "additional_charges.0.chargeValue": 123,
      "additional_charges.0.tax": 123,
      "additional_charges.0.hsn_code": "<string>"
    }
  ]
}
'
{
  "result.status": true,
  "result.message": "<string>",
  "result.invoice_id": 123,
  "result.link": "<string>",
  "result.code": 123
}
Create an invoice (or related document) for the business associated with your API token. The endpoint runs in a database transaction: party and line items are created or matched, totals are calculated, inventory and ledger entries are updated when applicable, and a shareable preview link is returned.
Your BillClap plan must include the API integration feature. See Authentication.
For full field reference, validation rules, and error codes, see the Create Invoice guide.

Request

Content-Type
string
default:"application/json"
required
Must be application/json.
x-api-token
string
required
API token from Settings → API Integration in the BillClap app.
type
string
required
Document type. Common values: SALESINVOICE, QUOTATION, SALESRETURN, PURCHASEBILL, PURCHASERETURN, DELIVERYCHALLAN, ORDER, PURCHASEORDER, SELLORDER, SALEORDER.
issue_date
string
Invoice issue date (YYYY-MM-DD).
due_date
string
Payment due date (YYYY-MM-DD).
receive_amount
number
Amount received against the invoice. Cannot exceed the calculated total.
party_detail
object
required
Customer or supplier details.
product_details
object[]
required
Line items. At least one entry with product_name is required.
additional_charges
object[]
Optional extra charges with tax.

Response

result.status
boolean
true on success.
result.message
string
Human-readable success message.
result.invoice_id
number
Internal BillClap invoice id.
Shareable preview URL for the created document.
result.code
number
Application status code (200 on success).