eileennoonan
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!
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
lawik
ThinStripe, PinStripe, RacingStripe, TigerCantChangeIts. So many naming options
olivermt
EarnedMyStripes
eileennoonan
Oh I really love PinStripe!
Gonna wait to see if more suggestions roll in before I pull the trigger on that but that’s great. Fun, fashionable, rolls of the tongue, and yet also suggests professionalism.
lawik
And also organized crime
eileennoonan
It is pretty gangster
eileennoonan
TinyElixirStripe has officially been renamed to PinStripe!
Kudos to @lawik for the Don Draper energy!
@AstonJ - is it possible to update the title of this post?
kevinschweikert
Done
eileennoonan
Thank you! Is it also possible to edit the tags? I’d like a
pin-stripetag I can subscribe toeileennoonan
PinStripe v0.2.2: Testing Utilities
PinStripe now includes handy testing utilities. This release adds two new modules.
PinStripe.Test.Mock provides high-level mocking helpers that wrap Req.Test:
PinStripe.Test.Fixtures leans on Stripe CLI to provide fixture generation:
Fixture generation requires a Stripe test API Key (live keys are not allowed). Each unique generated fixture will create a record in your Stripe dev dashboard and a cached version in
test/fixtures/stripe.If/when you change your Stripe API version, you can run
mix pin_stripe.sync_api_versionto fetch the current version and clear all locally cached fixtures. Fixtures will then be regenerated the next time you run your tests.asianfilm
I don’t use Stripe, but it looks like your library’s approach to webhook handling could be extracted as, or inspire, a more general solution.
Curious how Spark is involved. I’ll read through the webhook handling code in the Dashbit blog and then see how you evolved it here.