eileennoonan
PinStripe - A Stripe "Small Development Kit" for Elixir
PinStripe is a “small development kit” for Elixir and Stripe based off of @wojtekmach’s article SDKs with Req: Stripe on the Dashbit blog.
That blog post is great for more senior programmers and people who have time to roll their own integration. But what about those who just want to say “boom, Stripe”?
It would be great if Stripe provided an official Elixir SDK, but they don’t. The community project Stripity Stripe attempts to fill that gap. It has worked great for many people for a long time, but since the Stripe API is so sprawling it’s been cumbersome for maintainers and new code hasn’t been merged in over a year. This can give newcomers pause.
PinStripe aspires to find a middle ground by providing a maintainable, minimalistic interface with a few conveniences that should cover 95% of use cases without needing to meticulously cover the entire Stripe SDK.
Features include:
- Simple API Client built on Req with automatic ID prefix recognition
- Webhook Handler DSL using Spark for clean, declarative webhook handling
- Automatic Signature Verification for webhook security
- Code Generators powered by Igniter for zero-config setup
- Sync with Stripe to keep your local handlers in sync with your Stripe dashboard
Please note this library is still experimental! Tests are passing, igniter installation and mix tasks all seem to work! But community feedback and contributions are very welcome.
Kudos to @lawik for help with the name!
Most Liked
eileennoonan
lawik
Probably 6-7 years back I worked on a client project that had stripity stripe and they were rawdogging everything and had very little in terms of tests. I needed to modify billing so I wanted tests. And just being able to test behavior manually against Stripe.
I ended up writing some test helpers for the Stripe CLI to receive webhooks ( Use the Stripe CLI | Stripe Documentation ). Was a pretty neat thing.
Might fit as an optional config option for test and dev?
eileennoonan
Oh yeah! So actually the Dashbit article has an example of that too where it automatically starts the Stripe listener in dev mode and points it at the webhook endpoint. It’s on my short list to add that to the installer.
Also fwiw PinStripe does currently generate fixtures for webhhooks. Fixture gen uses the Stripe CLI, which means fixtures create a record in the Stripe dev dashboard when they’re first generated. After that though they are cached locally or, should I say, fixed.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








