Stripy

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.
Stripy takes care of setting headers, encoding the data,
configuration settings, etc (the usual boring boilerplate);
it also provides a parse/1 helper function for decoding.
Some basic examples:
iex> Stripy.req(:get, "subscriptions")
{:ok, %HTTPoison.Response{...}}
iex> Stripy.req(:post, "customers", %{"email" => "a@b.c", "metadata[user_id]" => 1})
{:ok, %HTTPoison.Response{...}}Where subscriptions and customers are REST API resources.
If you prefer to work with a higher-level library, check out "stripity_stripe" or "stripe_elixir" on Hex.
Installation
Add to your mix.exs as usual:
def deps do
[{:stripy, "~> 1.0"}]
endIf you're not using application inference, then add :stripy to your applications list.
Then configure the stripy app per environment like so:
config :stripy,
secret_key: "sk_test_xxxxxxxxxxxxx", # required
endpoint: "https://api.stripe.com/v1/", # optional
version: "2017-06-05" # optionalAbout
This project is sponsored by Heresy. We're always looking for great engineers to join our team, so if you love Elixir, open source and enjoy some challenge, drop us a line and say hello!
License
- Stripy: See LICENSE file.
- "Heresy" name and logo: Copyright © 2017 Heresy Software Ltd