Stripi is yet another Stripe Elixir API.
- Charges
- Customers
- Ephemeral Keys
- Balance
- Disputes
- Events
- File Uploads
- Payouts
- Refunds
- Tokens
- Sources (part of it)
- Subscriptions
- Connect
The package can be installed by adding Stripi
to your list of dependencies in mix.exs
:
def deps do
[
{:stripi, "~> 0.1.0"}
]
end
Since Stripe API requires you to use your own keys to test against it, you would need to create a "secret.exs" file in the config folder for this project and add the following:
use Mix.Config
config :stripi,
base_url: "https://api.stripe.com/v1",
secret_key: "sk_test_SECRET"
Tests are the best documentation of any code, the easiest way to understand how to use the library is by reading the test cases.