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.
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
Quick Start — Generate an Invoice
Request
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
{
"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
| Field | Type | Description |
|---|---|---|
| document | string | Base64-encoded PDF document, ready to decode and save |
| document_id | string | Unique identifier for the generated document |
| document_type | string | Type generated: invoice, receipt, packing_slip, return, or credit_note |
| currency | string | ISO 4217 currency code the document was rendered in (caller-supplied) |
| page_count | number | Number of pages in the generated PDF |
| tier | string | Subscription tier that produced the document (free, basic, pro, enterprise) |
| format | string | Output format — always pdf |
| schema_version | string | Response envelope schema version |
| quota_remaining | number | Documents remaining in your monthly quota after this call |
| generated_at | string | ISO 8601 timestamp of document generation |
Common Use Cases
Simple, transparent pricing
Start for free. Scale as you grow. All plans include access to official data sources and real-time verification.
Basic
1,000 requests/month
- 1,000 documents/month
- Invoice + Receipt + Packing Slip
- No watermark
- Email support
Pro
10,000 requests/month
- 10,000 documents/month
- All 5 document types
- Custom branding (logo, color, footer)
- Priority support
Enterprise
1,000,000 requests/month
- 1,000,000 documents/month included
- All 5 types + custom branding
- Metered overage above quota
- Dedicated support & SLA
API Reference
| Method | Path | Description |
|---|---|---|
| POST | /v1/documents/invoice | Generate an itemized invoice PDF |
| POST | /v1/documents/receipt | Generate a proof-of-payment receipt PDF |
| POST | /v1/documents/packing-slip | Generate a quantity-focused packing slip PDF |
| POST | /v1/documents/return | Generate a return / RMA authorization PDF |
| POST | /v1/documents/credit-note | Generate a credit note PDF referencing an original invoice |
| GET | /documents/types | List the 5 document types and per-tier availability |
| GET | /status | API health — real Redis ping + ReportLab render self-test |
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