svilen
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
You get high marks for simplicity.
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/1with examples in the README and module, since it’s intended to be used. - Both
headers/1andurl/3don’t necessarily need to be public, since they’re not used by the user. - Let
req/3take 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
HTTPoisonstruct, 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
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! ![]()
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









