Online ordering on the cheap.

Our neighbours have a Burger restaurant (it’s called Burgerlijk, delicious premium burgers!). With the pandemic creating a lot of uncertainty (The government closed them for several months in 2020, and in 2021 the rules are very strict). That’s what go them thinking: We should try out selling online!

That’s where I come in (If you don’t know me: I’m Matthias Nys, a passionate Software developer, mainly working on big backend projects). They asked: Can you setup a small form for selling our “DIY Burger boxes” that we will deliver to people in some neighbourhoods and cities at certain point in time.

Now I could setup a whole webshop that arranges everything, But that seemed like overkill for a PoC. So I suggested we could use a tool called, it’s locally built (We live in Belgium) and very versatile. It also has a lof of integrations

We started off by building a form that made sure we could get the orders in.
Some business rules:

- Grownup box: 17euro
- Kids 10euro
- No orders under 30euro (should block)
- Only delivering at some postal-codes at certain time-slot.

An afternoon of fiddling and we came up with this:

After completing the form you get a summary that looks like this:

The summary at the end of the form.

This processed the form and we could get the answers in the dashboard:

Google Sheets

Great, seems like a succes! But Tally itself has some great integrations:

Partial list of integrations.

So we just enabled the Google Sheets and we could process them in the trusted environment of a spreadsheet

That’s a lot easier!

Paying (Stripe) also has a feature to make sure people can pay on the form. Details can be found here:

We started implementing this into the form:

  • Created a Stripe Account
  • Coupled it to the little widget
  • Started testing it

Unfortunately we had stop using it. It only supports Credit Cards and the majority of Belgian online payments goes through Bancontact.

What a pity… We really wanted to enabled direct payments, that would make sure we have less problems while delivering our boxes!

Paying (Mollie)

After some digging I found out that we could use a “payment-link”, a service from Mollie to create our payments.

The concept is rather easy: Just do an api call to Mollie for a certain payment with certain description. Hand over the link to the other party, let them pay and voila you are sure you have your money.

Webhooks (Tally)

So, how do we create a payment-link at Mollie when they submit their form?

Setting up a webhook on

Fortunately has support for Webhooks. Every time a form is submitted, the webhook is called with relevant information:

"label":"Aantal volwassenen (€ 17,00 / persoon)",
"label":"Aantal kinderen (€ 10,00 / persoon)",
"label":"Wanneer leveren?",
"text":"8540 - Deerlijk ( 25/12/2021 - voormiddag)"
"text":"8531 - Bavikhove (25/12/2021 - voormiddag)"
"text":"8530 - Harelbeke (25/12/2021 - voormiddag)"
"text":"8500 - Kortrijk (26/12/2021 - namiddag)"
"label":"GSM nummer",
"value":"1-774-541-3913 x438"

Serverless (Lambda AWS)

We use this for the input on the script that will create a payment-link and send the email.

The script is running on AWS Lambda (using Serverless).

To get started: Just create an account on and click on create. Choose node HTTP API and you can just follow the instructions on setting up the development environment on your local machine!

Very basic api on Serverless

Lambda Code

After setting up the serverless environment we can continue on the code itself.

The code has to do 3 things:

  • Parse the webhook event from Tally (get Amount, name, submissionId)
  • Create a payment-link in Mollie
  • Send an e-mail using sendgrid (or any other provider)

So to get started with the Lambda we need to declare a function in the serverless.yaml file.

org: some-org
app: some-app
service: some-service
frameworkVersion: '2'provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: '20201221'
handler: handler.hello
- httpApi:
path: /
method: get
handler: handler.webhook
- httpApi:
path: /webhook
method: post

After that we can extend the handler.js with the following code (inline comments for more info)

Now deploy it using sls deploy in your terminal:

burgerlijk-box-send-mollie sls deployServerless: Using provider credentials, configured via dashboard: Packaging service...Serverless: Excluding development dependencies...Serverless: Ensuring that deployment bucket existsServerless: Uploading CloudFormation file to S3...Serverless: Uploading artifacts...Serverless: Uploading service file to S3 (385.8 kB)...Serverless: Validating template...Serverless: Updating Stack...Serverless: Checking Stack update progress........................Serverless: Stack update finished...Service Informationservice: some-servicestage: devregion: us-east-1stack: some-service-devresources: 29api keys:Noneendpoints:GET - - test-hellowebhook: test-webhooklayers:NoneServerless: Removing old service artifacts from S3...Serverless: Publishing service to the Serverless Dashboard...Serverless: Successfully published your service to the Serverless Dashboard:

In the above you can see the url for your webhook: -> add this to Tally webhook and click TEST. You should be able to see it in your serverless dashboard.

When you now submit a post an email will be sent out to the email address provided (be sure to setup a proper template, not part of this tutorial).

Example of an email sent from the Lambda using Sendgrid.

Google sheets (part 2)

Now we have all the data in Mollie, but we should also update the status in Google sheets as well to know if a certain order was paid for or not!

Google App Scripts to the rescue. Open the Spreadsheet that is linked to Click on Extensions and then Apps Script .

After that I added a script that fetches all the orders from Mollie and tries to match them up with the lines in the sheet itself:

On top of the spreadsheet there is now a button called “Mollie” and when you tap on it you get the option to “Update Payments”. That will populate the orders and the status of the payment.

With some google sheet magic and formulas we came out to this:

example of an entry with payment status.

Take aways

  • is a great tool!
  • Mollie is very easy to use api.
  • Google sheets remains very flexible (I’m a huge fan, see other posts as well!)
  • Lambda is very inexpensive solution to glue everything together!
  • The whole PoC is running for free, except for mollie transaction costs.

This blog post turned out longer than intended, but I felt like writing it down. I created this order form in 2 evenings, so the code might not be perfect at all! The only thing that mattered was getting a form up and running and some automation so we could launch this very quickly and start testing if there is animo enough for more and then build a mature solution.

Want more?

If you need some advice on integrations between any 2 systems. I can provide you professional advice and integrations (Mobile, Backend systems, Websites, databases,…). More information can be found on Feel free to follow me on Twitter and or LinkedIn.

If you liked this article, please share it with your network!




Coffee Geek. Tech Freak. Entrepreneur |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store