Monthly
Get last month's tax collected by country
On the 1st you get the tax collected last month, grouped by country and tax rate.
- Runs
- Monthly
- Apps
- Stripe
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: on the 1st of each month, email me last month's tax collected on paid Stripe invoices, grouped by country and tax rate.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A shop selling to customers in the EU, UK and several US states faces a different tax rate in each place. At filing time, the finance person exports invoices from Stripe, builds a pivot table and tries to split tax collected by country and rate. One miscategorized invoice means the return is wrong, and fixing a filing after submission is slow and costs penalties.
On the 1st, ClickRuntime lists last month's paid invoices, sums the total_tax_amounts field grouped by rate and country and emails you a clean table of taxable sales and tax collected. You can hand it straight to your accountant or use it to prepare VAT and sales tax returns.
It is built for sellers who collect tax through Stripe Tax or manual tax rates and need a monthly figure.
What you get out of it
Tax returns start from correct numbers
A table by country and rate means you are not rebuilding the figures from a raw export. Starting from the right total reduces errors that lead to amended returns. The monthly rhythm also keeps small errors from piling up across a whole quarter.
You set aside the right amount of cash
Tax collected is not revenue. Seeing the exact liability each month tells you how much to hold back, so a surprise payment due never raids your operating cash. That planning prevents a painful scramble when a filing deadline arrives with too little cash set aside.
Different jurisdictions stay separate
Splitting by country and rate keeps French VAT apart from German VAT and Texas sales tax apart from California. Each authority gets filed with its own accurate total. The split is also easier to review against Stripe Tax reports if you want a second check.
Accountants spend less time on preparation
A prepared monthly table reduces the hours an accountant needs to compile figures, which usually shows up as a smaller bill and fewer questions. The ready-made table gives them a clean starting point for filings.
Rate mistakes show up quickly
If a country suddenly shows an unexpected rate or zero tax, you see it within a month. Fixing a Stripe Tax setup in April beats discovering it during a December review.
How it works
What happens, step by step
On the 1st of each month, ClickRuntime collects last month's paid Stripe invoices.
It adds up the tax on them by country and tax rate.
You get an email with one line per country and rate, like "DE VAT 19.0% 1,842.10 EUR".
Before it runs live
- Connect Stripe
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Stripe steps into one automation
Under the hood
The code that runs this automation
from collections import defaultdict
from datetime import datetime, timezone
import stripe
from clickruntime import on_trigger, credentials, notify
@on_trigger
def run(event):
stripe.api_key = credentials.secret("STRIPE_API_KEY")
end = datetime.now(timezone.utc).replace(day=1, hour=0, minute=0, second=0, microsecond=0)
start = end.replace(year=end.year - 1, month=12) if end.month == 1 else end.replace(month=end.month - 1)
rates, totals = {}, defaultdict(int)
invoices = stripe.Invoice.list(status="paid", created={"gte": int(start.timestamp()), "lt": int(end.timestamp())}, limit=100)
for inv in invoices.auto_paging_iter():
for tax in inv.total_tax_amounts or []:
rate_id = tax.tax_rate if isinstance(tax.tax_rate, str) else tax.tax_rate.id
if rate_id not in rates:
rates[rate_id] = stripe.TaxRate.retrieve(rate_id)
r = rates[rate_id]
totals[(r.country or "—", f"{r.display_name} {r.percentage}%", inv.currency.upper())] += tax.amount
lines = [f"{country} {rate} {amount / 100:,.2f} {cur}" for (country, rate, cur), amount in sorted(totals.items())]
notify.email_me(f"Tax collected in {start:%B %Y}", "\n".join(lines) or "No tax collected.")
return {"lines": len(lines)}FAQ
Common questions
Does it work with Stripe Tax and manual tax rates?
Is the summary a valid tax filing?
Are credit notes and refunds subtracted?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get yesterday's revenue every morning
Each morning you see yesterday's charges, refunds and new subscriptions in one message.
See how it worksGet a monthly revenue report
On the 1st you get last month's gross, refunds, net and new vs cancelled subscriptions, compared with the month before.
See how it worksSee overdue invoices every week
Each Monday you get open invoices past their due date, oldest first.
See how it worksKeep exploring
Set up “Get last month's tax collected by country” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.