Feeding Stripe data into LittleGreenLight

Earlier this month, @rando and I sat down and figured out how to pipe data from stripe into our CRM, LittleGreenLight.

After a bunch more poking and prodding the stripe and LGL APIs (wtf when did they introduce Invoices?), I’ve come up with this script:

I’ll be installing it on unicorn and setting it to run in a daily cron. When it runs, it creates a number of entries in the “Integration Queue” in LGL which allow for manual approval of the data. At some point we can turn off the manual approval step and let this sucker run forever.

The step after this is to setup a system where we all check LGL frequently and use the Gift Acknowledgement flags to send a thank-you e-mail to people and track who has responded to which donation.

The LGL API is frikkin weird as hell and I might be doing it wrong, but this works for now. Its goofy because you don’t actually do CRUD operations like “create this gift” “update this person’s list of donations”; instead, you POST a bunch of :sparkles: data :sparkles: to a URL, then configure some maps that translate those POST parameters into LGL fields, then review that your fields match up for each record and approve it.

But thank god it isn’t SOAP.

1 Like

The LGL people are pretty responsive, so if we encounter weirdness we can’t get around with their derpy API, chances are good they’ll help us work through it.

We can’t be the only people pulling from Stripe having to come to with quirky solutions.

1 Like