rustedf.cloud
Menu

Free receipt template: HTML and PDF you can copy

Published 2 min read

Free receipt template as a PDF: received-from block, date, payment method, total received, purpose and signature line

Free template

Use this template for free

Create a free account, make a new template in the Code mode and paste the HTML below. Then send your own data from the API.

Download the HTMLDownload the sample data

A receipt is short and it matters: it is the proof that a payment arrived. This one is a clean single-page receipt in HTML and CSS. It says who paid, when, how and how much, what the payment was for, and it has a signature line for whoever received it. You can use it as it is or change it. Below you can download the sample PDF, copy the code and see the data it takes.

What is in the template

  • The company block with a small logo mark, name, address and tax number.
  • The title and the number of the receipt, at the top right.
  • A received from block with the payer, the date, and the payment method.
  • A large box with the total received, in the currency and the format of the reader’s language.
  • A purpose section with a sentence, a list of the lines the payment covers and a reference, such as the number of the invoice it settles.
  • A signature line for the company and the date, and a short note at the end.

How to use it

In the portal. Create a free account, click New template, switch to the Code mode and paste the HTML below. You get a live preview.

From the API. Download the HTML and the sample data and send both in one request. This example uses jq to put the files in the body:

Terminal window
curl -X POST https://api.rustedf.com/v1/render \
-H "Authorization: Bearer $RUSTEDF_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html receipt.html --slurpfile data receipt-data-en.json \
'{html: $html, data: $data[0], locale: $data[0].locale}')" \
-o receipt.pdf

A receipt is usually issued when a payment is confirmed, so the natural place for the call is the step of your code that records the payment. Save the HTML as a template and call it by its id from there.

Make it yours

  • Lines and amount. The lines list holds what the payment covers, one row each, and amount is the total. Send amounts as strings, such as "2400.00", and work the total out in your own system.
  • Reference. Put the number of the invoice or the order the payment settles, so the receipt can be matched to it. The free invoice template is built to go with this one.
  • Method. It is free text: bank transfer, card, cash, or whatever you accept.
  • Colors, logo and fonts. The yellow bar is a hex color in the CSS. Replace the small <svg> with your logo as <img src="asset:<id>" width="120">. The template names Lato and Poppins, and any Google Fonts family works by name.
  • Language. Every label comes from the t object of the data, so the same template issues receipts in any language you can write.

A note on what a receipt is

A receipt confirms that a payment was made. It does not replace a tax invoice, and the rules for receipts and invoices differ by country. Check what applies to you before you issue one to a customer.

See Templates and Locales and formatting.

The template code

<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <style>
      @page { size: A4; margin: 16mm; }
      body { font-family: Lato, sans-serif; font-size: 9.5pt; color: #1b1b1b; line-height: 1.5; }
      h1, .brand, .label, .big { font-family: Poppins, Lato, sans-serif; }
      table { width: 100%; border-collapse: collapse; }
      td, th { vertical-align: top; }
      .muted { color: #666666; }

      .top td { padding: 0; }
      .brand { font-size: 15pt; font-weight: bold; margin: 2mm 0 0 0; }
      .kind { font-family: Poppins, Lato, sans-serif; font-size: 26pt; font-weight: bold; text-align: right; margin: 0; line-height: 1; }
      .number { text-align: right; margin-top: 2mm; color: #666666; }

      .bar { height: 3mm; margin: 7mm 0 7mm 0; background: #f5c518; }

      .label { font-size: 7pt; font-weight: bold; letter-spacing: 1.2pt; text-transform: uppercase; color: #666666; margin: 0 0 1.2mm 0; }
      .value { font-size: 10pt; margin: 0; }
      .meta td { padding: 0 6mm 0 0; width: 33%; }

      .amount { margin-top: 9mm; border: 3px solid #1b1b1b; padding: 6mm 7mm; background: #f6f2e6; }
      .amount .label { margin-bottom: 2mm; }
      .big { font-size: 26pt; font-weight: bold; margin: 0; line-height: 1.1; }

      h2 { font-family: Poppins, Lato, sans-serif; font-size: 11pt; font-weight: bold; margin: 9mm 0 2.5mm 0; padding-bottom: 1.5mm; border-bottom: 2px solid #1b1b1b; }
      .lines td { padding: 2.6mm 2mm; border-bottom: 1px solid #d9d9d9; }
      .right { text-align: right; }

      .sign { margin-top: 18mm; }
      .sign td { width: 45%; padding-top: 2mm; border-top: 1px solid #1b1b1b; }
      .sign .gap { width: 10%; border-top: 0; }
      .note { margin-top: 10mm; border-left: 3mm solid #f5c518; padding: 2mm 0 2mm 5mm; }
    </style>
  </head>
  <body>
    <table class="top">
      <tr>
        <td style="width: 55%">
          <svg width="46" height="16" viewBox="0 0 46 16">
            <circle cx="8" cy="8" r="7" fill="#d72820" />
            <rect x="17" y="1" width="14" height="14" fill="#1d3fa6" />
            <rect x="34" y="1" width="12" height="14" fill="#f5c518" />
          </svg>
          <p class="brand">{{ company.name }}</p>
          <p class="muted">{{ company.line1 }}<br />{{ company.line2 }}<br />{{ company.tax }}</p>
        </td>
        <td>
          <p class="kind">{{ t.title }}</p>
          <p class="number">{{ t.number }} {{ number }}</p>
        </td>
      </tr>
    </table>

    <div class="bar"></div>

    <table class="meta">
      <tr>
        <td>
          <p class="label">{{ t.received_from }}</p>
          <p class="value"><strong>{{ payer.name }}</strong><br />{{ payer.line1 }}</p>
        </td>
        <td>
          <p class="label">{{ t.date }}</p>
          <p class="value">{{ issued | date(style="long") }}</p>
        </td>
        <td>
          <p class="label">{{ t.method }}</p>
          <p class="value">{{ method }}</p>
        </td>
      </tr>
    </table>

    <div class="amount">
      <p class="label">{{ t.total_received }}</p>
      <p class="big">{{ amount | currency(code=currency) }}</p>
    </div>

    <h2>{{ t.purpose }}</h2>
    <p>{{ description }}</p>
    <table class="lines" style="margin-top: 3mm">
      {% for line in lines %}
      <tr>
        <td>{{ line.name }}</td>
        <td class="right">{{ line.amount | currency(code=currency) }}</td>
      </tr>
      {% endfor %}
    </table>
    <p class="muted" style="margin-top: 3mm">{{ t.reference }}: {{ reference }}</p>

    <table class="sign">
      <tr>
        <td>{{ t.received_by }} {{ company.name }}</td>
        <td class="gap"></td>
        <td>{{ t.date }}: {{ issued | date(style="long") }}</td>
      </tr>
    </table>

    <div class="note">
      <p class="muted">{{ note }}</p>
    </div>
  </body>
</html>

The sample data

{
  "locale": "en-US",
  "currency": "USD",
  "number": "R-2025-0087",
  "issued": "2025-04-02",
  "company": {
    "name": "Aurora Studio",
    "line1": "482 Acacia Street · Austin, TX",
    "line2": "[email protected]",
    "tax": "EIN 12-3456789"
  },
  "payer": {
    "name": "Northwind Traders Inc.",
    "line1": "1500 Congress Avenue, Austin, TX"
  },
  "method": "Bank transfer",
  "reference": "Invoice 2025-0142",
  "description": "Payment received for the brand identity project, first installment.",
  "lines": [
    { "name": "Brand identity, 50% on approval", "amount": "2400.00" }
  ],
  "amount": "2400.00",
  "note": "This receipt confirms the payment above. Keep it for your records.",
  "t": {
    "title": "Receipt",
    "number": "No.",
    "received_from": "Received from",
    "date": "Date",
    "method": "Payment method",
    "total_received": "Total received",
    "purpose": "For",
    "reference": "Reference",
    "received_by": "Received by"
  }
}

← All posts