Pin Stripe banner
enoonan enoonan

Pin Stripe

Development community

Description

A minimalist Stripe integration for Elixir.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

PinStripe

**A minimalist Stripe integration for Elixir.**

Warning {: .warning}

This library is still experimental! It's thoroughly tested in ExUnit, but that's it.

Stripe doesn't provide an official Elixir SDK, and maintaining a full-featured SDK has proven to be a challenge. As I see it, this is because the Elixir community is pretty senior-driven. People have no problem rolling their own integration with the incredible [Req](https://hexdocs.pm/req/Req.html) library.

This library is an attempt to wrap those community learnings in an easy-to-use package modeled after patterns set forth in Dashbit's [SDKs with Req: Stripe](https://dashbit.co/blog/sdks-with-req-stripe) article by Wojtek Mach.

My hope is that this should suffice for 95% of all apps that need to integrate with Stripe, and that the remaining 5% of use cases have a built-in escape hatch with Req.

Features

  • 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

Installation

Using Igniter (Recommended)

The fastest way to install is using the Igniter installer:

mix igniter.install pin_stripe

This will:

  1. Add the dependency to your mix.exs
  2. Replace Plug.Parsers with PinStripe.ParsersWithRawBody in your Phoenix endpoint
  3. Generate a StripeWebhookController with example event handlers
  4. Add the webhook route to your router (default: /webhooks/stripe)
  5. Configure webhook_paths in config/runtime.exs
  6. Add DSL formatting support to .formatter.exs

Then configure your Stripe credentials:

# config/runtime.exs
config :pin_stripe,
  stripe_api_key: System.get_env("STRIPE_SECRET_KEY"),
  stripe_webhook_secret: System.get_env("STRIPE_WEBH