Use case: voice integrated autonomous payments via FINN

At FINN, we’re in to make the future of autonomous payments and IoT applications relevant. An exciting additional feature for our service, is enabling autonomous payment through voice - by integrating with Google Voice Assistant. In this blog, our Software Developer Lokesh walks you through all steps needed to trigger autonomous payments by instructing the voice assistant. Let’s dive right in!

 

Our use case: smart vending machine

To illustrate how things work we came up with a use case. It’s concerning a smart vending machine at our office, connected to the office network and capable of receiving beverage disposal requests through voice. The vending machine disposes both hot (coffee, tea, milk) and cold beverages (Pepsi, Coca-Cola, Fanta). 

 

Current situation

Employees request their drinks through manual buttons. The vending machine dispenses the requested beverage and triggers the payment with FINN. Our goal: to enable the vending machine to receive the beverage request through voice.

The vending machine should dispense the requested drink, trigger the payment and send a push notification to the mobile app that is registered as owner of the machine. The push notification confirms the beverage was ordered successfully, and payment will be done automatically. Great improvement of the experience of the customer!

 

Triggering payments through voice

We can also pair the vending machine with our software by remotely accessing their respective QR-codes, using the mobile app. After that, we can configure the vending machine to trigger payments through instruction by voice. There are 3 options the Google assistant provides to achieve our goal:
 

  1. Google Home - Smart Speaker & Home Assistant
  2. Cloud Functions
    Useful as fulfilment to store and retrieve the given voice instruction in converted text (with help of Google Cloud Database Service).
  3. Web-hook
    Useful as fulfilment to post voice converted text to our own web service at provided URL.

 

Our choice: web-hook

Employees request their drinks through manual buttons. The vending machine dispenses the requested beverage and triggers the payment with FINN. Our goal: to enable the vending machine to receive the beverage request through voice.

We selected web-hook to have our very own web-service running within the office network. Also, we select the fulfilment option for Dialog flow as web-hook, providing our web service URL to post the voice instruction details. The web-service is planned to be running on edge gateway to route the voice instruction to the proper smart IoT device within our local network. 
 

How it works technically

So, the smart IoT device is installed and configured by our SDK - to be able to communicate with FINN’s services. The edge gateway device processes the received request on provided URL end point and triggers the autonomous payment request to FINN. After receiving a response, the gateway process builds the response string and sends back the response to Google Assistant. Finally, the edge gateway requests the IoT smart device to trigger a push notification being send to the registered user’s mobile FINN app.

 

Still unclear? Have a look at the picture below, illustrating the solution’s workflow: 

workflow-vending-smart-iot
Illustration of this solution’s workflow

List of needed entities

To bring the above described solution in action, you need multiple entities:
 

  1. Hardware Devices
    • Raspberry Pi Zero
    • Laptop / Raspberry Pi 3/4 to act as Gateway 
    • Mobile Phone - Android / iOS 
     
  2. Software Packages 
    BoT-Java-SDK for Raspberry Pi Zero 
    BoT-Gateway-Service to run on Gateway device 
product-id-smart-vending-iot
Define Product in Maker Portal & make a note of ProductID
payment-actions-portal-iot-smart
Define required Payment Actions in the Maker Portal - make note of actions

Also, define required push notifications for vending machines in the Maker Portal - and make note of their Ids. Just like we’ve done for payment actions in previous step. 

The full manual in your mailbox

Want to know how this works in-depth? Our Lokesh made an extensive instruction manual that will guide you through it. 


Fill out your details and we’ll get you the full case in PDF



Get the FINN newsletter

Be the first to receive use cases, updates, and the latest IoT news. Stay ahead of the curve by subscribing to our newsletter.