licenseapi.dev
5 Document TypesBase64 PDFCustom Branding (Pro+)

Ecommerce Document Generator API

Generate professional ecommerce PDFs — invoices, receipts, packing slips, returns/RMA, and credit notes — from caller-supplied JSON in a single API call. Deterministic rendering, base64 PDF response, custom branding on Pro and above.

Documents

What the API generates

Invoice

Itemized invoice with line items, tax lines, totals, due date, and payment terms

Receipt

Proof-of-payment receipt with payment method, amount tendered, and change due

Packing Slip

Fulfillment slip focused on quantities and ship-to — no prices required

Return / RMA

Return authorization with reason codes, restocking fee, and original invoice reference

Credit Note

Credit memo referencing an original invoice, with credit reason and amount

This API renders the figures you send, exactly as sent. It performs no tax, total, or currency calculation and does not verify accuracy. Pure document templating — no shipping labels, postage, or carrier integration.
Quick Start

Quick Start — Generate an Invoice

Request

curl
curl --request POST \
  --url 'https://ecommerce-document-generator.p.rapidapi.com/v1/documents/invoice' \
  --header 'x-rapidapi-host: ecommerce-document-generator.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "seller": {
      "name": "Acme Supplies Inc",
      "address": "123 Market St\nSan Francisco, CA 94103",
      "email": "billing@acme.example",
      "tax_id": "US-12-3456789"
    },
    "bill_to": { "name": "Globex Corporation", "address": "500 Buyer Ave\nNew York, NY 10001" },
    "document_number": "INV-1001",
    "document_date": "2026-06-24",
    "due_date": "2026-07-24",
    "currency": "USD",
    "payment_terms": "Net 30",
    "line_items": [
      { "sku": "WIDGET-1", "description": "Blue Widget", "quantity": 4, "unit_price": 25.0, "line_total": 100.0, "tax_amount": 8.25 }
    ],
    "tax_lines": [ { "label": "State Sales Tax", "amount": 8.25, "rate": 8.25 } ],
    "totals": { "subtotal": 100.0, "tax_total": 8.25, "grand_total": 108.25, "balance_due": 108.25 }
  }'

Response

response.json
{
  "document_id": "9f1c2a7e-4b3d-4e21-9a01-6f2c8d5e7b10",
  "document_type": "invoice",
  "currency": "USD",
  "page_count": 1,
  "generated_at": "2026-06-24T19:00:00Z",
  "schema_version": "1.0",
  "tier": "pro",
  "format": "pdf",
  "document": "JVBERi0xLjQKJdPr6eEK...",
  "quota_remaining": 9994
}
Response Schema

Response Schema

FieldTypeDescription
documentstringBase64-encoded PDF document, ready to decode and save
document_idstringUnique identifier for the generated document
document_typestringType generated: invoice, receipt, packing_slip, return, or credit_note
currencystringISO 4217 currency code the document was rendered in (caller-supplied)
page_countnumberNumber of pages in the generated PDF
tierstringSubscription tier that produced the document (free, basic, pro, enterprise)
formatstringOutput format — always pdf
schema_versionstringResponse envelope schema version
quota_remainingnumberDocuments remaining in your monthly quota after this call
generated_atstringISO 8601 timestamp of document generation
Use Cases

Common Use Cases

Ecommerce platforms and storefronts generating order documents
Order management systems (OMS) and fulfillment tools producing packing slips
Billing, accounting, and bookkeeping software emitting branded invoices
Marketplaces issuing receipts and credit notes to sellers and buyers
Subscription and SaaS billing flows that need PDF invoices on demand
Returns and customer-service tooling generating RMA documents
Pricing

Simple, transparent pricing

Start for free. Scale as you grow. All plans include access to official data sources and real-time verification.

Free

$0

50 requests/month

  • 50 documents/month
  • Invoice only
  • Watermarked PDF
  • Base64 PDF output
Start Free

Basic

$29/mo

1,000 requests/month

  • 1,000 documents/month
  • Invoice + Receipt + Packing Slip
  • No watermark
  • Email support
Get Started
Most Popular

Pro

$99/mo

10,000 requests/month

  • 10,000 documents/month
  • All 5 document types
  • Custom branding (logo, color, footer)
  • Priority support
Get Started

Enterprise

Custom

1,000,000 requests/month

  • 1,000,000 documents/month included
  • All 5 types + custom branding
  • Metered overage above quota
  • Dedicated support & SLA
Contact Sales
Endpoints

API Reference

MethodPathDescription
POST/v1/documents/invoiceGenerate an itemized invoice PDF
POST/v1/documents/receiptGenerate a proof-of-payment receipt PDF
POST/v1/documents/packing-slipGenerate a quantity-focused packing slip PDF
POST/v1/documents/returnGenerate a return / RMA authorization PDF
POST/v1/documents/credit-noteGenerate a credit note PDF referencing an original invoice
GET/documents/typesList the 5 document types and per-tier availability
GET/statusAPI health — real Redis ping + ReportLab render self-test
FAQ

Frequently asked questions

What format is the document returned in?

Documents are returned as base64-encoded PDFs in the document field of a standardized JSON envelope. Decode the string and save it as a .pdf file in your application — the envelope is identical across every document type and tier.

Does the API calculate tax, totals, or convert currency?

No. This API renders the figures you send, exactly as sent. It performs no tax, total, or currency calculation and does not verify accuracy. You supply every amount, tax line, and total; the API lays them out into a clean, professional PDF. A single caller-supplied currency is rendered per document.

Can I add my own branding?

Yes, on Pro and Enterprise tiers. You can pass a logo (https URL or base64 image), a brand color (hex), and a footer note. Free and Basic documents use the standard layout; Free documents are watermarked.

Is this a shipping label or postage tool?

No. This is pure document templating. There are no shipping labels, postage indicia, carrier integration, or rate/tracking lookups. Packing slips include free-text carrier and tracking-note fields, but the API performs no carrier lookup.

How reliable is it?

It is compute-only — deterministic ReportLab rendering with no scraping or third-party data dependency, so it does not break the way data-scraping APIs can. It ships with standardized error envelopes, durable metrics, a fail-closed monthly quota, and a real /status self-test monitored 24/7.

Do you offer enterprise contracts?

Yes. Enterprise includes 1,000,000 documents/month with metered overage above quota, custom branding, dedicated support, and an SLA. Contact us for committed-volume pricing.

Need custom volume or SLA guarantees?

Contact us for enterprise pricing, white-label access, dedicated support, and custom contracts tailored to your platform.

Contact Enterprise Sales