eileennoonan

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!

First Post! Switch mode

lawik

lawik

Nerves Core Team

ThinStripe, PinStripe, RacingStripe, TigerCantChangeIts. So many naming options :stuck_out_tongue:

Most Liked

eileennoonan

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?

lawik

lawik

Nerves Core Team

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

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.

Last Post!

zanuka

zanuka

awesome!

Where Next?

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
385 14863 120
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
zachdaniel
Introducing AshStorage! Attachment and file management that slots directly into your resources :smiling_face_with_sunglasses: I had hope...
New

Other Trending Topics Top

type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
yureehuh
Introduction Founded in 2017 by landscape ecologist and fire mitigation expert Harry Statter, Frontline developed the first fully integra...
New

We're in Beta

About us Mission Statement