nbgoodall / zevvle-monzo-receipts

Lambda function to add Zevvle receipts to Monzo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zevvle Receipts in Monzo

This AWS Lambda function adds receipt data to Zevvle's Monzo transactions. It listens for charge events from the Zevvle API, finds the related Monzo transaction and uploads the data.

Setup

  1. Get your Monzo credentials

Login to the Monzo developer portal and get your access token and your account ID. You'll need to verify the API playground from the Monzo mobile app.

  1. Deploy the Lambda function

    1. Login to the AWS Lambda console.
    2. Create a new function, call it whatever you like (e.g. zevvle-monzo-receipts) and select the Python 3.8 runtime.
    3. Upload the deployment package under Function code > Actions > Upload a .zip file. You can either download the premade one from S3 or clone this repository, run sh create_package.sh and upload function.zip.
    4. In the Environment variables pane add your MONZO_ACCESS_TOKEN AND MONZO_ACCOUNT_ID from above.
    5. In the Basic settings pane, change the Handler to zevvle_receipts.handler.
    6. In the Designer pane, click 'Add Trigger' and select API Gateway. Select the HTTP API and set the Security to Open. Once saved, expand the details below and copy the 'API endpoint'.
  2. Register the Zevvle webhook

Login to the Zevvle developer portal. You'll need a Zevvle account with an active SIM card.

Copy the secret token and register a webhook to receive charge events:

  curl -G -X POST https://api.zevvle.com/webhooks \
  -H "Authorization: Bearer $ZEVVLE_SECRET_TOKEN" \
  -d "url=$LAMBDA_FUNCTION_INVOKE_URL" \
  -d "type=charge.created"

And you're done! Zevvle receipts will now show in Monzo. ☎️ 💳

The future

  • Add data/call/sms usage to transaction notes
  • PDF receipt attachments

And a generic integration with e.g. Flux for multi-bank Zevvle receipts...

About

Lambda function to add Zevvle receipts to Monzo


Languages

Language:Python 93.4%Language:Shell 6.6%