Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
/ stripe-importer Public archive

AWS Lambda function to import Stripe transactions to Xero

License

Notifications You must be signed in to change notification settings

newaperio/stripe-importer

Repository files navigation

Stripe to Xero

Stripe to Xero is an AWS Lambda function to import Stripe transactions into Xero. It is built with the Serverless framework. It acts as a webhook that Stripe POSTs to. Once deployed, you can set the URL as a webhook in the Stripe dashboard. It will only respond to charge.succeeded and transfer.paid events.

Deploying

To deploy, run the Serverless command:

serverless deploy

Testing

You can run the function locally to test its function. First you'll need all of the required API keys. Next, download the webhook JSON payload from the Stripe dashboard. Once you have everything set up, run the test and feed the JSON payload into the function.

serverless invoke local --function stripeImporter --path webhooks/transfer.paid.json

Environment Setup

The function requires API keys for both Stripe and Xero as well as some information about Xero accounts. These keys are stored in separate secret.{ENV}.yml files, which are then gitignored. See secrets.example.yml for everything needed. Fill in the secrets and then rename the file.

About

AWS Lambda function to import Stripe transactions to Xero

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published