Library to interface with the Stripe Api. Most of the code is generated from the Stripe OpenApi definitions.
Inspiration was drawn from Stripity Stripe and openapi.
def deps do
[
{:striped, "~> 0.5.0"}
]
end
client = Stripe.new(api_key: "sk_test_123")
{:ok, %Stripe.Customer{}} = Stripe.Customer.retrieve(client, "cus123")
{:ok, %Stripe.Customer{}} =
Stripe.Customer.create(client, %{
description: "Test description"
})
For the exact parameters you can consult the Stripe docs.
Stripe errors can be found in the Stripe.ApiErrors
struct.
Network errors etc. will be found in the error term.
{:error, %Stripe.ApiErrors{}} =
Stripe.Customer.retrieve(client, "bogus")
Stripe api calls made through this library emit Telemetry events. See the
Stripe.Telemetry
module for more information
Striped
uses the OpenApi definitions to build itself, so it
uses the latest Api Version. You can however override the
version by passing the :version
option to the client.
This SDK is generated for version: VERSION
See https://stripe.com/docs/upgrades#__VERSION__ for breaking changes.
- File Uploads currently don't work.
- Connected Accounts are not supported yet.