In this tutorial, I will show you how to make a IOTA Payment System using Amazon's Alexa Voice Assistant to collect the payment. When the payment is confirmed, a Webhook is called to provide your service.
The user calls an Alexa Skill and sends a payment to the QR code address. A Lambda function is executed every minute and checks if the money has arrived. When the transation is confirmed, the Lambda function calls a Webhook to provide your service. This is the workflow:
You can find the code in repository https://github.com/econnie323/alexa-iota
You need to create a new Lambda function (alexa-skills-kit-nodejs-factskill) to display the QR Code in the Echo Show. Replace the index.js with ASK/index.js from GitHub. Then add ASK/splash.json and put iota.png with the QR code in S3.
You need to create a new skill in ASK with this model:
- ASK/model.json
Then you need to create a new Lambda function to verify the payment every minute:
- index.js
That's all!
Comments