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

Quick Start

Generate your first invoice in 3 simple steps:

Step 1: Get your API Key
Sign up at invovate.com and 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 Authorization header.

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.com and 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

Field Type Required Description
title string Yes Your company name
invno string Yes Invoice number
date string Yes Invoice date (YYYY-MM-DD)
to string Yes Client address (multi-line)
currency string Yes Currency code (USD, EUR, AED, etc.)
lang string Yes Language code (en, ar, fr, es, etc.)
template string Yes Template name (neat-pro, etc.)
rows array Yes Array of line items

Line Item Fields

Field Type Required Description
desc string Yes Item description
qty number/string Yes Quantity
rate number/string Yes Unit price
disc number/string No Discount percentage
tax number/string No Tax percentage

Optional Fields

Field Type Description
due string Due date (YYYY-MM-DD)
po string Purchase order number
terms string Payment terms
ship string Shipping address
notes string Additional notes
refund string Refund policy
logo string Base64 encoded logo image
sig string Base64 encoded signature image
customLabels object Custom 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

Field Type Description
success boolean Request success status
pdf string Base64 encoded PDF file
credits.remaining number Your remaining credit balance
credits.used number Credits used in this call (always 1)
credits.userType string Always "api" for API calls
mode string Always "api" for API calls
metadata object Additional information about the generated PDF

Error Handling

Error Response Format

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

Common Error Codes

Error Code HTTP Status Description
API_KEY_REQUIRED 401 Missing API key in Authorization header
INVALID_API_KEY 401 Invalid or expired API key
EMAIL_VERIFICATION_REQUIRED 403 Account email not verified
INVALID_JSON 400 Invalid JSON in request body
INSUFFICIENT_CREDITS 402 Not enough credits to generate PDF
API_SECURITY_LIMIT_EXCEEDED 429 Rate limit exceeded
RENDER_ERROR 400 PDF generation failed
INTERNAL_ERROR 500 Internal 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 Code Language Direction
en English LTR
ar Arabic RTL
ar-e Eastern Arabic RTL
fr French LTR
es Spanish LTR
hi Hindi LTR
pt Portuguese LTR

Available Templates

Template Name Description
neat-pro Clean professional design
modern-right Right-aligned modern layout
classic-left Traditional left-aligned design
elegant-gray-pro Elegant gray color scheme
band-blue-pro Blue header band design
cool-waves-pro Modern wave pattern design