Skip to content
Giallo

Automatic payment of the tourist tax with Stripe

Collect tourist tax before arrival: calculate the amount, generate a payment link on demand and track receipts. A real case involving 17 apartments.

Reading time: 9 min

Flow of the automatic payment of the tourist tax: guest, calculation of the amount, link and collection

Pay for the Online tourist tax before arrival is one of the cleanest cases of automation applied to a receptive activity: the amount is calculable from certain data, the right time to ask for it is known, and the result — the collection. is verifiable.

Before automation, the fee either cashed in person on arrival or chased after. Both roads cost time and produce cash to manage. The automatic route is different: the system calculates the exact amount for that reservation, generates a payment link and puts it in the message with the check-in instructions.

This article describes how it works in the project carried out for Rial Estate out of 17 apartments in Milan, told in full in full case study.

In summary

  • The tourist tax is Calculated in advance: adults, nights and city rate are enough to determine the exact amount.
  • The payment link is created on the fly for that reservation and entered in the instruction message.
  • The municipal rules count: minor exempt and maximum night cap are fixes to implement, not details.
  • The cost is one Commission on collection, not a fee for automation: check the official supplier list.
  • We need a plan for those who don't pay before they arrive: automation reduces cases to chase, it doesn't eliminate them.

Why this process lends itself well

Not all payments are automated the same way. That is, for three reasons.

The amount is deterministic. There is nothing to negotiate or interpret: a formula and data. This makes it reliable so that a commercial quote, for example, would never be.

The right time is known. The fee must be paid before or during the stay, so the message of the pre-arrival instructions is the natural place to stick the link.

The result is verifiable. Either the cash comes or it doesn't. There's no need to interpret the outcome, which makes it easy to build a reminder for those who haven't paid.

How to calculate the amount

The basic formula is simple, but corrections matter.

  1. Adults per night per rate. The core of the calculation, with the rate set by the municipal regulation.
  2. Exclude minors. Almost all regulations exempt them, often under a certain age. The number of adults should be taken from the booking data, not from the total number of guests.
  3. Apply the roof on nights. Many municipalities only tax up to a maximum number of consecutive overnight stays: beyond that threshold the amount no longer grows.
  4. Check the special exemptions. Some regulations provide for specific cases. They must be read on the current text of the municipality of reference, because they change.
Warning Tariffs and exemption rules are decided by the individual municipality and change over time. They must be read on the current regulation and put in one point of the code, so that an update requires a single change instead of a hunt for the value scattered in the flows.

The stream, when composing the message of the instructions, does three things in sequence: it calculates the amount, creates a price with that value at the payment provider, and generates a single-use link associated with that price. The link ends as a variable inside the message template.

The simplest alternative would be a fixed link with a set amount, but it does not hold up the variability: two adults for three nights and four adults for seven nights pay different figures, and asking the guest to calculate or enter the amount is the best way to not get paid.

Approach Advantage Limit
Link generated on the fly Exact amount, no calculation for host Requires integration with the payment provider
Fixed link to free amount Very simple to do The guest must calculate and enter the amount: many miss or give up
On-site cash No technology Cash to be managed, time of the host, cases to be chased

The mistake that cost us the most

It's worth telling here because it was born right on this piece of the system.

For a misconfiguration of the environment, the payment link was not generated. The code, instead of stopping, replaced the missing link with a fallback text and continued. The message started anyway, without a link.

The result: for days messages were started without the payment link, with zero executions in error in logs. From the outside the system seemed in perfect health. The problem only emerged when someone noticed that the receipts did not arrive.

The Lesson A silent fallback turns a technical bug into invisible commercial damage. If an essential piece of the message cannot be generated, the message must not start — or must leave leaving an explicit trace of the reason, in a field that someone is looking at.

The other incidents of the project are collected in Six errors paid in the field.

What changes for those who welcome

The most visible benefit is not accounting, it is organizational. Asking for money in person upon arrival is the most unpleasant part of the welcome: it comes immediately after the greeting, changes the tone of the meeting and often happens while the guest is tired and loaded with suitcases.

Moving the payment to two days before takes that moment out of the day of the host and turns it into a line in a message. Those who arrive have already paid and no longer think about it.

There is also a less obvious effect on cash management. Cashing small sums in cash on multiple apartments means having physical money that spins, to be counted, to be paid and to be reconciled with reservations. With online collection that reconciliation is already done: every payment brings with it the reference to the stay.

What Improves

  • No cash to manage, count and pay.
  • Automatic reconciliation between collection and booking.
  • The arrival of the guest does not begin with a request for money.
  • Those who have not paid can be identified before arrival, not after.

What remains to be guarded

  • Those who do not pay online should still be contacted by one person.
  • Municipal rules change and must be updated by hand.
  • Refunds for cancelled stays remain a manual case.
  • It is necessary to periodically check that links are really generated.

The reminder for those who haven't paid

A built-in automation without outcome control is half automation. The piece that closes the circle is simple: the day before arrival, the system checks which bookings have an associated payment and which do not.

For those who have not paid, two paths open, and the choice is more of a process than a technical one. The first is a second message with the same link, kind and without solicitous tones: many simply forgot. The second is to report the case to the staff, who will decide whether to insist or cash in on arrival as was done before.

In the project of short rents the choice fell back on the automatic reminder, with the collection on site as the last network. The logic is the same as the Automatic reminders: remembering early and gracefully works better than chasing late.

Practical examples

Two adults, four nights. The calculation produces the amount for two people for four nights according to the municipal rate. The link starts with instructions two days before arrival. The guest pays from the phone while preparing the suitcase.

A family with two children. There are two adults, the minors exempt: the amount is halved compared to a naïf calculation on four people. It is exactly the type of correction that, if forgotten, produces complaints and refunds.

A long stay. Ten nights in a municipality that charges at most a smaller number: the amount stops at the threshold. Without the roof implemented, you would cash in more than you should — a mistake worse than the opposite one, because it exposes the activity.

A different activity with the same pattern. Any amount that can be calculated from booking data is suitable: registration fees, advance payments, surcharges. The logic is the same as described in AI quote automation applied to a simpler calculation.

Mistakes to Avoid

The silent fallback. Already told, and it is the most expensive because invisible. Make any failure noisy.

Not handling exemptions. Charging minors or exceeding the cap on nights means collecting money that is not due: a problem that goes beyond inconvenience to the customer.

Not planning for non-payment. If the plan is just "I send the link", the one who doesn't pay disappears from the radar. You need a check and a reminder, or the explicit confirmation that those cases come back manual.

Putting the tariff in several places. When the municipality updates it, you'll forget one.

Not linking payment received to the booking. If the payment comes without a clear reference to which stay it concerns, reconciliation becomes manual labor — and half the benefit is lost.

How to apply it in the company

  1. Verify that the amount is really computable from the data you have. If the number of adults is missing, for example, the calculation does not start: the problem is in management software, not in automation.
  2. Put the rules in one place, with a comment saying which regulation they come from and when it was consulted.
  3. Link payment to booking with a reference, so the reconciliation remains automatic.
  4. Decide what happens when it fails before going into production: message blocked, or sent with a note and a notice to the staff.
  5. Predict the reminder for those who did not pay by the time of arrival.

The link to the management software, from which the data of the calculation come, is described in Integrating management software. The sending channel in WhatsApp Cloud API.

Conclusion

Pay for the Online tourist tax is an automation from immediate return and contained risk: the amount is computable, the moment is known, the outcome is verifiable. The value is not just the early cashasso it is taking out of the day of those who welcome the task of asking for money at the door.

The thing to do right from the start is just one thing: make sure the system screams when it fails to generate the link, instead of sending an incomplete message and letting you discover the problem by missing receipts.

AI becomes useful when it enters processes. Giallo Studio helps SMEs and teams build concrete, measurable and sustainable automations. If you want an idea of the costs of a similar project, you can find it on the page prices.

Giallo Studio guides: methodology and sources

How we apply it in the company

Related resources

AI consulting services and process automation

FAQ

Can I charge the tourist tax before arrival?

Yes. The amount can be calculated in advance from the booking details — number of adults, nights, municipal rate and exemptions — so you can generate a payment link and send it with the check-in instructions. The guest pays from their phone before leaving, and nobody needs to collect cash at the door.

How do you calculate the amount?

The basic formula is adults multiplied by nights multiplied by the municipal rate, with the adjustments required by local regulations: minors are generally exempt, and many municipalities cap the number of taxable nights. Rules vary between municipalities: read the current regulations rather than making assumptions.

How much does collecting payments online cost?

Using the payment provider's APIs has no separate cost: you pay a fee on the amount collected. The percentages vary by payment method and over time: consult the provider's official price list rather than relying on figures read elsewhere.

What happens if the guest does not pay before arriving?

You need a fallback plan, decided during project design: an automatic reminder or collecting payment on site as before. Automation reduces the number of cases requiring follow-up, but does not eliminate them: someone must still handle guests who do not pay online.

Is the payment link reusable?

Depends on how you create it. In the project described here it is generated on the fly with the exact amount of that reservation, so it is specific to that stay. A generic link with fixed amount would be simpler but would not manage the variability of guests and nights.

Do you need to integrate the management system to make it work?

Yes, because that is where the data determining the amount — number of guests and dates — is stored. Without a connection to the management system, the amount would have to be entered manually, and the automation would lose much of its purpose.

Put it into practice

Let's turn this guide into your first live workflow.

Tell us what process you want to lighten: we evaluate feasibility, return and first operational step.