Invovate← Back to Invoice Generator

Invoice Generator API

Generate professional PDF invoices with simple API calls

v1.0.0

Overview

The Invoice Generator API allows you to create professional PDF invoices with support for multiple languages, RTL layouts, and various design templates. Each API call consumes 1 credit.

Simple Pricing

1 credit per invoice generation

Multi-language

English, Arabic, French, Spanish, and more

RTL Support

Full Right-to-Left layout for Arabic

Professional Templates

Multiple design options

Base URL:
https://invovate.com/api(Production)
http://localhost:8788/api(Development)

Quick Start

Generate your first invoice in 3 simple steps:

Step 1: Get your API Key
Sign up at invovate.comand generate your API key in the dashboard
Step 2: Create invoice JSON file
Save your invoice data as a JSON file (see examples below)
Step 3: Make API call
curl -X POST https://invovate.com/api/render -H "Content-Type: application/json" -H "Authorization: inv_sk_your_api_key_here" -d "@invoice.json"

Authentication

All API requests require an API key for authentication. Include your API key in the Authorizationheader.

Authorization: inv_sk_your_api_key_here
API Key Format:Your API key starts with inv_sk_followed by a unique identifier.
Important:Keep your API key secure and never expose it in client-side code. Your API key provides full access to your account credits.

Credit System

Each successful PDF generation consumes 1 credit from your account balance.

Simple Pricing:1 credit = 1 generated invoice

Checking Your Credit Balance

Every API response includes your current credit balance:

{ "credits": { "remaining": 95, "used": 1, "userType": "api", "verified": true } }

Purchasing Credits

To purchase additional credits, visit invovate.comand navigate to the billing section.

Note:API calls will fail if you have insufficient credits. Always check your balance in the API response.

Generate PDF Invoice

POST
/api/render

Generate a PDF invoice from JSON data. Consumes 1 credit on success.

Request Headers

Content-Type: application/json Authorization: inv_sk_your_api_key_here

Request Body

Send your invoice data as a JSON file or inline JSON object.

Request Format

Required Fields

FieldTypeRequiredDescription
titlestringYesYour company name
invnostringYesInvoice number
datestringYesInvoice date (YYYY-MM-DD)
tostringYesClient address (multi-line)
currencystringYesCurrency code (USD, EUR, AED, etc.)
langstringYesLanguage code (en, ar, fr, es, etc.)
templatestringYesTemplate name (neat-pro, etc.)
rowsarrayYesArray of line items

Line Item Fields

FieldTypeRequiredDescription
descstringYesItem description
qtynumber/stringYesQuantity
ratenumber/stringYesUnit price
discnumber/stringNoDiscount percentage
taxnumber/stringNoTax percentage

Optional Fields

FieldTypeDescription
duestringDue date (YYYY-MM-DD)
postringPurchase order number
termsstringPayment terms
shipstringShipping address
notesstringAdditional notes
refundstringRefund policy
logostringBase64 encoded logo image
sigstringBase64 encoded signature image
customLabelsobjectCustom text labels for different languages

Response Format

Success Response

{ "success": true, "pdf": "base64_encoded_pdf_string_here", "credits": { "remaining": 95, "used": 1, "userType": "api", "verified": true }, "mode": "api", "metadata": { "template": "neat-pro", "language": "en", "direction": "ltr", "fileSize": 15432, "creditsRemaining": 95, "itemsCount": 3, "hasLogo": true, "hasSignature": false } }

Response Fields

FieldTypeDescription
successbooleanRequest success status
pdfstringBase64 encoded PDF file
credits.remainingnumberYour remaining credit balance
credits.usednumberCredits used in this call (always 1)
credits.userTypestringAlways "api" for API calls
modestringAlways "api" for API calls
metadataobjectAdditional information about the generated PDF

Error Handling

Error Response Format

{ "success": false, "error": "Error message description", "code": "ERROR_CODE" }

Common Error Codes

Error CodeHTTP StatusDescription
API_KEY_REQUIRED401Missing API key in Authorization header
INVALID_API_KEY401Invalid or expired API key
EMAIL_VERIFICATION_REQUIRED403Account email not verified
INVALID_JSON400Invalid JSON in request body
INSUFFICIENT_CREDITS402Not enough credits to generate PDF
API_SECURITY_LIMIT_EXCEEDED429Rate limit exceeded
RENDER_ERROR400PDF generation failed
INTERNAL_ERROR500Internal server error

Code Examples

English Invoice Example (invoice_en.json)

{ "title": "Sample Business Inc.", "invno": "INV-2025-001", "date": "2025-11-13", "due": "2025-12-13", "currency": "USD", "lang": "en", "template": "neat-pro", "to": "Client Company\n123 Business Ave\[email protected]", "ship": "Global Tech Solutions - Warehouse\n456 Shipping Lane\nNew York, NY 10001", "notes": "Thank you for your business!", "rows": [ { "desc": "Website Development", "qty": "10", "rate": "75", "disc": "0", "tax": "20" }, { "desc": "Consulting Hours", "qty": "5", "rate": "120", "disc": "0", "tax": "20" } ] }

Arabic Invoice Example (invoice_ar.json)

{ "title": "شركة العينة", "invno": "INV-2025-001", "date": "2025-11-13", "due": "2025-12-13", "currency": "USD", "lang": "ar", "template": "neat-pro", "direction": "rtl", "to": "شركة العميل\n123 شارع الأعمال\[email protected]", "rows": [ { "desc": "تطوير موقع الويب", "qty": "10", "rate": "75", "disc": "0", "tax": "20" } ], "customLabels": { "invoiceNoLabel": "رقم الفاتورة", "invoiceDateLabel": "تاريخ الفاتورة", "billToLabel": "فوترة إلى", "itemLabel": "البند", "qtyLabel": "الكمية" } }

cURL Command

# Using JSON file curl -X POST https://invovate.com/api/render -H "Content-Type: application/json" -H "Authorization: inv_sk_your_api_key_here" -d "@invoice_en.json" # Save response to file curl -X POST https://invovate.com/api/render -H "Content-Type: application/json" -H "Authorization: inv_sk_your_api_key_here" -d "@invoice_en.json" --output response.json

JavaScript Example

async function generateInvoice(invoiceData) { const API_KEY = 'inv_sk_your_api_key_here'; try { const response = await fetch('https://invovate.com/api/render', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': API_KEY // No "Bearer" prefix }, body: JSON.stringify(invoiceData) }); const result = await response.json(); if (result.success) { // Decode base64 PDF const pdfBytes = Uint8Array.from(atob(result.pdf), c =>c.charCodeAt(0)); const blob = new Blob([pdfBytes], { type: 'application/pdf' }); // Download PDF const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `invoice-${invoiceData.invno}.pdf`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); console.log(`PDF generated! Remaining credits: ${result.credits.remaining}`); } else { console.error('Error:', result.error); } } catch (error) { console.error('Request failed:', error); } } // Usage const invoiceData = { title: "My Company", invno: "INV-001", date: "2024-01-15", currency: "USD", lang: "en", template: "neat-pro", to: "Client Name\nClient Address", rows: [ { desc: "Web Design", qty: 1, rate: 1000 } ] }; generateInvoice(invoiceData);

Python Example

import requests import base64 import json API_KEY = "inv_sk_your_api_key_here" URL = "https://invovate.com/api/render" invoice_data = { "title": "My Company", "invno": "INV-001", "date": "2024-01-15", "currency": "USD", "lang": "en", "template": "neat-pro", "to": "Client Company\n123 Client St", "rows": [ {"desc": "Web Design", "qty": 1, "rate": 1000} ] } headers = { "Content-Type": "application/json", "Authorization": API_KEY # No "Bearer" prefix } response = requests.post(URL, headers=headers, json=invoice_data) result = response.json() if result["success"]: # Save PDF to file pdf_data = base64.b64decode(result["pdf"]) with open("invoice.pdf", "wb") as f: f.write(pdf_data) print(f"PDF generated! Remaining credits: {result['credits']['remaining']}") else: print(f"Error: {result['error']}")

Supported Languages

Language CodeLanguageDirection
enEnglishLTR
arArabicRTL
ar-eEastern ArabicRTL
frFrenchLTR
esSpanishLTR
hiHindiLTR
ptPortugueseLTR

Available Templates

Template NameDescription
neat-proClean professional design
modern-rightRight-aligned modern layout
classic-leftTraditional left-aligned design
elegant-gray-proElegant gray color scheme
band-blue-proBlue header band design
cool-waves-proModern wave pattern design