Send a JSON payload
POST to the template endpoint with the values you want rendered. Authenticate with your API key.
Compact order receipts for confirmation emails and thank-you screens
The Receipt Image template is the shortest path to a working receipt image generator api from your stack. Send a small JSON payload, get back a tested PNG that fits your brand. No browser, no headless Chrome wrangling, no design tooling on your side.
Common reasons people reach for this template:
POST to the template endpoint with the values you want rendered. Authenticate with your API key.
The template is rendered server-side as a 1200x630 PNG (or whatever dimensions the template defines).
The response includes a CDN URL for the PNG. Cache it, embed it, attach it to a tweet, anything you need.
A single cURL call to render a Receipt Image as a PNG:
curl -X POST https://app.html2img.com/api/v1/templates/receipt-image \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"business_name":"Studio Ink","order_number":"#A8421-9032","order_date":"Apr 30, 2026","customer_name":"Jamie Park","customer_email":"[email protected]","items":[{"name":"Botanical print, A2","qty":"2","amount":"$58.00"},{"name":"Hand-bound notebook","qty":"1","amount":"$24.00"},{"name":"Letterpress card pack","qty":"3","amount":"$36.00"}],"subtotal":"$118.00","shipping":"$8.00","tax_amount":"$10.40","total":"$136.40","thank_you_message":"Thanks for supporting independent makers.","accent_color":"#B45309"}' For the full PHP, Node and Python equivalents, plus every input the template accepts, see the Receipt Image API reference. Setting up your key is covered in the authentication guide.
A quick summary of what the Receipt Image template accepts. The full reference, including example values and array shapes, is in the docs.
| Name | Type | Required |
|---|---|---|
| business_name | string | Required |
| logo_url | url | Optional |
| order_number | string | Required |
| order_date | string | Optional |
| customer_name | string | Optional |
| customer_email | string | Optional |
| items | array | Required |
| subtotal | string | Optional |
| shipping | string | Optional |
| tax_amount | string | Optional |
| total | string | Required |
| thank_you_message | string | Optional |
| accent_color | string | Optional |
See the full inputs reference for descriptions, examples and validation rules.
Sign up free, grab an API key, send a payload. The pricing page covers the higher-volume plans if you outgrow the free tier.