Typestate
Sign in

Freelancer invoices and reminders

Invoices get numbers that are never reused, go out by email, and a reminder follows when one is late.

For a freelancer who bills clients and chases late payments.

Resend logo Resend
Start it with your agentUses 6 of your 100 changes a month

Start the freelancer invoices and reminders blueprint on Typestate

Asked you for the name on your invoices and the address your emails come from.

Started Freelancer invoices and reminders: 2 record types, 5 web endpoints.

6 actions are compiling, one change each.

Deployed to Sandbox. Try it at your Sandbox address.

What your agent does when you start this blueprint

How it runs

Who does what, in order. Each step is one action of the backend.

  1. Youadd a clientAdd a Client
  2. Youdraft an invoice, and it gets the next numberDraft an Invoice
  3. Yousend it, and the client gets it by emailSend an Invoice
  4. Your backendsends a reminder 7 days late, and again after 14Chase Late Invoices
  5. Youmark it paid when the money arrivesMark an Invoice Paid

The rule you will want to change first

A reminder goes 7 days after the due date, and a second one after 14. After that, the invoice is marked overdue and nobody is emailed again.

It lives in the action Chase Late Invoices. Tell your agent how you want it instead: one sentence changes, and you read the change before it goes live.

What it is made of

What it keeps, what it does, and what it reaches.

What it keepsClientowner, name, email,addressInvoiceowner, number, client,description, total,due on, state...What it doesAdd a Clientcalled by a signed-inpersonDraft an Invoicecalled by a signed-inpersonSend an Invoicecalled by a signed-inpersonMark an InvoicePaidcalled by a signed-inpersonList Invoicescalled by a signed-inpersonChase LateInvoicesEvery day at 09:00,Berlin timeWhat it reachesResendSend email from yourown address: sign-in...Your website5 web endpointsWhat it keepsClientowner, name, email,addressInvoiceowner, number, client,description, total,due on, state...What it doesAdd a Clientcalled by a signed-inpersonDraft an Invoicecalled by a signed-inpersonSend an Invoicecalled by a signed-inpersonMark an InvoicePaidcalled by a signed-inpersonList Invoicescalled by a signed-inpersonChase LateInvoicesEvery day at 09:00,Berlin timeWhat it reachesResendSend email from yourown address: sign-in...Your website5 web endpoints

What it keeps

Client

4 fields

A client you bill.

owner
required
name
required, at most 120 characters
email
required, an email address
address
optional, at most 400 characters

Only the freelancer who signed in sees their clients.

Invoice

8 fields

One invoice, with its number and whether it is paid.

owner
required
number
required, never twice
client
required
description
required, at most 2000 characters
total
required, a whole number
due on
required, a date
state
required, one of draft, sent, paid, overdue
reminders
required, a whole number, 0 to 2

Only the freelancer who signed in sees their invoices.

What it does

Every action, with its full definition in plain English.

Add a ClientYou add a client with their email address.
Add a client, given a name, an email address and a billing address. Save the client, with the signed-in person as its owner_id, and answer it.
Draft an InvoiceYou write an invoice, and it gets the next number of the year.
Draft an invoice, given a client's id, a description, a total and a number of days to pay. 1. If there is no such client, refuse with "No such client". 2. If the days to pay are less than 1 or more than 90, refuse with "Give between 1 and 90 days to pay". 3. The number is this year, a dash, and the count of invoices numbered this year plus one, with 3 digits: 2026-001, 2026-002. 4. Save the invoice as a draft, with the signed-in person as its owner_id, due that many days from today. 5. Answer the invoice.
Send an InvoiceThe invoice goes to the client by email.
Send an invoice, given its id. 1. If there is no such invoice, refuse with "No such invoice". 2. If it is not a draft, refuse with "This invoice was already sent". 3. Email the client: subject "Invoice" and the number, from the name in the BUSINESS_NAME setting, with the description, the total in euros and the due date. 4. Mark the invoice sent. 5. Answer the invoice.
Mark an Invoice PaidYou mark an invoice paid when the money arrives.
Mark an invoice paid, given its id. 1. If there is no such invoice, refuse with "No such invoice". 2. If it is a draft, refuse with "Send the invoice first". 3. If it is already paid, answer it and change nothing. 4. Mark it paid and answer it.
List InvoicesYou see every invoice, and what is owed.
Read the invoices, newest first, with each one's number, client name, total, due date and state. The list may be narrowed to one state. Also answer the total that is sent or overdue and not paid.
Chase Late InvoicesEvery morning, late invoices get a reminder: after 7 days, after 14, then they are marked overdue.
For the freelancer this run is for, find each of their invoices that is sent and not paid. For each one: 1. If it is 7 or more days past its due date and no reminder went out, email the client a reminder: subject "Reminder: invoice" and the number, with the total and the due date. Count 1 reminder. 2. If it is 14 or more days past its due date and 1 reminder went out, email a second reminder the same way. Count 2 reminders. 3. If it is more than 21 days past its due date and 2 reminders went out, mark it overdue and email nobody.

What it does by itself

  • Every day at 09:00, Berlin time, late invoices are chased.

Who signs in

People sign up and sign in with an email address and a password, or with a provider you add, such as Google.

  • Client: Only the freelancer who signed in sees their clients.
  • Invoice: Only the freelancer who signed in sees their invoices.

Web endpoints

What it doesWho may callAddress
You add a client.a signed-in personPOST /clients
You draft an invoice.a signed-in personPOST /invoices
You send an invoice.a signed-in personPOST /invoices/send
You mark an invoice paid.a signed-in personPOST /invoices/paid
You read your invoices.a signed-in personGET /invoices

What it cannot do yet

  • It does not make a PDF. The email carries the invoice as text.
  • It does not take card payments. The client pays by bank transfer and you mark it paid.
  • It is not bookkeeping software. Your accountant still needs the invoices.

Build the pages with your tool

Typestate is the backend. Paste this brief into Lovable, v0, Claude Code or the tool that builds your pages.

Show the brief
Build the pages for "Freelancer invoices and reminders". The backend runs on Typestate and answers these web endpoints: POST /clients: You add a client. Who may call: a signed-in person. POST /invoices: You draft an invoice. Who may call: a signed-in person. POST /invoices/send: You send an invoice. Who may call: a signed-in person. POST /invoices/paid: You mark an invoice paid. Who may call: a signed-in person. GET /invoices: You read your invoices. Who may call: a signed-in person. People sign up at POST /auth/signup and sign in at POST /auth/login, which answers a token. Send it as Authorization: Bearer <token>. A refused call answers a sentence that can be shown to the person as it is.

Start it

  1. Tell your agent the sentence on the right.
  2. It asks you for your name or your business's name, as it goes on each invoice.
  3. It asks you for the address emails come from, on a domain you verified at Resend, such as "Riverside Physio <hello@riverside.example>".
  4. It tells you what only you can do, such as pasting your Stripe key. A key never goes through the agent.
  5. Open your Sandbox address and try it yourself.

Uses 6 of the 100 changes a month on the Free plan, which runs it on Sandbox. Taking real money on Live needs a paid plan.

Start the freelancer invoices and reminders blueprint on TypestateOpen an account

Related blueprints