[{"data":1,"prerenderedAt":321},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fguides\u002Frecurring-invoices":3,"github-stars":318},{"id":4,"title":5,"body":6,"description":309,"extension":310,"meta":311,"navigation":312,"order":299,"path":313,"section":314,"seo":315,"stem":316,"__hash__":317},"docs\u002Fdocs\u002Fguides\u002Frecurring-invoices.md","Recurring invoices",{"type":7,"value":8,"toc":297},"minimark",[9,13,30,35,41,140,144,147,150,153,157,163,181,188,192,195,199,202,234,238,247,258,262,265,290],[10,11,5],"h1",{"id":12},"recurring-invoices",[14,15,16,17,21,22,25,26,29],"p",{},"Some work bills the same way on a schedule: a monthly retainer, a support\nplan, a fixed hosting fee. A ",[18,19,20],"strong",{},"recurring invoice"," captures that once - a\nclient, a set of fixed-amount lines, and a cadence - and Clerq drafts each\ninvoice for you when it comes due. You'll find them under the ",[18,23,24],{},"Recurring"," tab\non the ",[18,27,28],{},"Invoices"," page.",[31,32,34],"h2",{"id":33},"setting-one-up","Setting one up",[14,36,37,40],{},[18,38,39],{},"New recurring invoice"," opens a single form:",[42,43,44,56,62,68,94,100,106,116,122,128,134],"ul",{},[45,46,47,50,51,55],"li",{},[18,48,49],{},"Name"," - an internal label, like ",[52,53,54],"em",{},"Acme monthly retainer",". It's how the\nschedule is listed; it never appears on the invoice.",[45,57,58,61],{},[18,59,60],{},"Client"," - who gets billed.",[45,63,64,67],{},[18,65,66],{},"Currency"," - the currency every generated invoice is raised in.",[45,69,70,73,74,77,78,81,82,85,86,89,90,93],{},[18,71,72],{},"Repeats"," - the cadence, written as ",[52,75,76],{},"every N"," ",[18,79,80],{},"weeks",", ",[18,83,84],{},"months",",\n",[18,87,88],{},"quarters"," or ",[18,91,92],{},"years",". Leave the number at 1 for a plain weekly or\nmonthly schedule, or raise it (up to 52) for, say, every 2 weeks.",[45,95,96,99],{},[18,97,98],{},"First invoice date"," - when the series starts. The first invoice is dated\non this day, and every following occurrence steps out from it.",[45,101,102,105],{},[18,103,104],{},"Payment terms (days)"," - how long after each invoice's date it falls due.\nSet 0 for due-on-issue.",[45,107,108,111,112,115],{},[18,109,110],{},"End date"," and ",[18,113,114],{},"Max invoices"," - optional stop conditions. Set either, both\nor neither; leave both blank to keep billing until you pause or end it.",[45,117,118,121],{},[18,119,120],{},"VAT treatment"," - standard, zero-rated or EU reverse charge, exactly as on a\none-off invoice. The picker only appears once your business has a VAT number\nset; until then generated invoices are zero-rated. Standard rate needs your\nrate configured in settings first.",[45,123,124,127],{},[18,125,126],{},"Lines"," - the fixed-amount lines stamped onto every invoice this generates\n(a retainer fee, a fixed monthly total). Amounts are plain figures in the\nschedule's currency; one with more decimal places than the currency allows is\nrejected, never rounded.",[45,129,130,133],{},[18,131,132],{},"Notes"," - optional free text printed at the foot of every generated invoice.",[45,135,136,139],{},[18,137,138],{},"Issue automatically"," - see below.",[31,141,143],{"id":142},"how-invoices-are-generated","How invoices are generated",[14,145,146],{},"When an occurrence comes due, Clerq stamps out a fresh invoice from the\nschedule: its client, currency, tax setup, lines and notes, dated on the\noccurrence, due after the payment terms, and covering the period from that date\nup to the day before the next occurrence.",[14,148,149],{},"The standard VAT rate is read live at generation time rather than frozen onto\nthe schedule, so a rate change in settings flows through to future invoices -\njust like a hand-made one.",[14,151,152],{},"Generation is exact and safe under concurrency: each run is claimed under a row\nlock, so a restart, a missed sweep, or a second worker can never double-bill,\nand invoice numbers stay sequential. If a schedule's start date is well in the\npast, Clerq catches up in bounded steps rather than firing every missed invoice\nat once - the remainder rolls to the next sweep.",[31,154,156],{"id":155},"auto-issue-or-review-first","Auto-issue, or review first",[14,158,159,160,162],{},"Whether a generated invoice is issued for you or left to review is the\n",[18,161,138],{}," switch:",[42,164,165,175],{},[45,166,167,170,171,174],{},[18,168,169],{},"Off"," (the default) - each invoice lands as a ",[18,172,173],{},"draft",". Review it, then\nissue and send it yourself, exactly as with any other invoice.",[45,176,177,180],{},[18,178,179],{},"On"," - Clerq assigns the next number and marks the invoice sent the moment\nit's generated. You still download and send the PDF; only the issuing step is\nautomated.",[14,182,183,184,187],{},"Auto-issue is best-effort per invoice. If one can't be issued cleanly - most\ncommonly an EU reverse-charge invoice that's missing a VAT number - it's left\nas a draft for you to fix, and the schedule is flagged ",[18,185,186],{},"Needs attention"," with\nthe reason. The rest still issue.",[31,189,191],{"id":190},"cadence-and-month-ends","Cadence and month-ends",[14,193,194],{},"Weekly schedules step by whole weeks. Month-based schedules pin to the\nday-of-month of the start date, clamped to each month's length, so they never\ndrift earlier over time: a schedule starting on the 31st bills 31 Jan -> 28 Feb\n-> 31 Mar, not 31 Jan -> 28 Feb -> 28 Mar.",[31,196,198],{"id":197},"pausing-ending-and-editing","Pausing, ending and editing",[14,200,201],{},"Each schedule has its own page, with the controls to steer it:",[42,203,204,210,216,222,228],{},[45,205,206,209],{},[18,207,208],{},"Pause \u002F Resume"," - pausing stops generation; resuming rolls the next run\nforward past any occurrences missed while paused. A pause is a skip, never a\ndeferred back-bill.",[45,211,212,215],{},[18,213,214],{},"End"," - stops the schedule for good. It's terminal: to bill the client this\nway again, create a fresh one. Invoices it already produced are kept.",[45,217,218,221],{},[18,219,220],{},"Edit"," - change the template or cadence at any time. Cadence changes apply\nfrom the schedule's current place in the series; if nothing has generated yet,\nthe change re-pins to the new start date.",[45,223,224,227],{},[18,225,226],{},"Generate next now"," - bill the next occurrence immediately instead of\nwaiting for the sweep - handy to raise the first invoice the moment a retainer\nis agreed.",[45,229,230,233],{},[18,231,232],{},"Delete"," - removes the schedule and its template. The invoices it generated\nare real documents and stay put; they simply detach from the schedule.",[31,235,237],{"id":236},"generated-invoices-are-ordinary-invoices","Generated invoices are ordinary invoices",[14,239,240,241,246],{},"A generated invoice is a normal invoice in every other respect - it lists\nalongside the rest, and everything in ",[242,243,245],"a",{"href":244},"\u002Fdocs\u002Fguides\u002Ftime-and-invoicing","Time & invoicing","\napplies: void it, duplicate it, mark it paid, export its PDF. The schedule's\npage also lists every invoice it has produced, so you can see the run at a\nglance.",[248,249,250],"blockquote",{},[14,251,252,253,257],{},"An AI assistant can manage retainers for you too: listing them, setting one\nup, pausing or ending it, and generating the next invoice on demand are among\nthe actions exposed through the ",[242,254,256],{"href":255},"\u002Fdocs\u002Fai\u002Fmcp-server","MCP server",".",[31,259,261],{"id":260},"running-the-scheduler-self-hosting","Running the scheduler (self-hosting)",[14,263,264],{},"On a normal long-running deployment there's nothing to set up: the app runs an\nin-process scheduler that sweeps for due schedules every 15 minutes and catches\nup shortly after each restart.",[14,266,267,268,272,273,276,277,280,281,284,285,289],{},"Serverless or edge hosts have no long-lived process to tick, so point an\nexternal scheduler (a platform cron job, or a plain ",[269,270,271],"code",{},"curl"," on a timer) at\n",[269,274,275],{},"POST \u002Fapi\u002Fcron\u002Frun"," instead. That endpoint is guarded by the ",[269,278,279],{},"CLERQ_CRON_TOKEN","\nenvironment variable and returns 404 until the token is set, so it's never an\nopen endpoint on a default install. The sweep is idempotent, so running both the\nin-process ticker and the cron endpoint is harmless. To turn the in-process\nticker off entirely, set ",[269,282,283],{},"CLERQ_DISABLE_SCHEDULER=1",". See\n",[242,286,288],{"href":287},"\u002Fdocs\u002Fself-hosting\u002Fenvironment-variables#optional-recurring-invoice-scheduler","Environment variables","\nfor both settings.",[248,291,292],{},[14,293,294,295,257],{},"Just need fixed-amount lines on a single invoice, not a schedule? Add them\nstraight to a draft - see ",[242,296,245],{"href":244},{"title":298,"searchDepth":299,"depth":299,"links":300},"",3,[301,303,304,305,306,307,308],{"id":33,"depth":302,"text":34},2,{"id":142,"depth":302,"text":143},{"id":155,"depth":302,"text":156},{"id":190,"depth":302,"text":191},{"id":197,"depth":302,"text":198},{"id":236,"depth":302,"text":237},{"id":260,"depth":302,"text":261},"Set up a retainer once and Clerq drafts each invoice when it comes due - cadence, auto-issue, and how generation stays exact.","md",{},true,"\u002Fdocs\u002Fguides\u002Frecurring-invoices","Guides",{"title":5,"description":309},"docs\u002Fguides\u002Frecurring-invoices","EuBih7XM10E1H6In2OlElXMm9TlkNhMMOEAef0_vyng",{"stars":319,"repo":320},0,"PunterDigital\u002Fclerq",1784716910862]