svilen

svilen

Author of Concurrent Data Processing in Elixir

Stripy — micro wrapper for Stripe's REST API

Hey all,

We (Heresy) recently open-sourced a tiny library for working with Stripe’s REST API. From the official package description:

Stripy is a micro wrapper intended to be used for sending requests to Stripe’s REST API. It is made for developers who prefer to work directly with the official API and provide their own abstractions on top if such are needed.

There are currently a bunch of other Stripe libraries available, but we didn’t like the provided abstractions on top of the official API, so we ended up with something fairly simple that works well for us and allows us to upgrade to newer Stripe API versions easily.

Hope someone else finds it useful!

Hex: stripy | Hex
Hexdocs: Stripy — Stripy v2.1.0
Source: GitHub - svileng/stripy: Micro wrapper for Stripe's REST API. · GitHub

Most Liked

christopheradams

christopheradams

You get high marks for simplicity. :slight_smile: Very good Mixfile too with nice docs links. I encourage all package makers to follow this example.

If you’re open to some feedback:

  • Document parse/1 with examples in the README and module, since it’s intended to be used.
  • Both headers/1 and url/3 don’t necessarily need to be public, since they’re not used by the user.
  • Let req/3 take config options to override the Application env, to make it more adaptable and testable. This is the most important point I can make.
  • Don’t return an HTTPoison struct, since it’s leaky, just use your own. If you drop down to pure Hackney or switch to another HTTP package, the user shouldn’t necessarily be bothered.
soundstruck

soundstruck

I’m using Stripy in production now. So far, so good! :slight_smile:

soundstruck

soundstruck

Interesting. I’m in the planning stages of integrating Stripe/subscriptions into my app, so this is quite timely for me.

I wasn’t thinking about a lag in the versions between library → api…that makes sense. I’ll definitely have a good look at Stripy. I did something very basic and similar with the Spotify API, but mostly because I was using so little of the api.

I’m trying to work out the database side to support Stripe at the moment. If anyone has implemented stripe subscriptions and wouldn’t mind taking a look and giving feedback it would be greatly appreciated.

Here’s where I’m at with it : QuickDBD

btw, sidenote, I love that app ^ for sketching out db thoughts! :smiley:

Where Next?

Popular in Announcing Top

bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
mspanc
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement