Search documentation of stripe_elixir

# StripeElixir (stripe_elixir v0.1.0)

Copy Markdown View Source

Elixir client for the Stripe API.

## Quick Start

    client = StripeElixir.client("sk_test_...")

    {:ok, intent} = StripeElixir.Services.PaymentIntentService.create(client, %{
      amount: 2000,
      currency: "usd"
    })

## Configuration

    client = StripeElixir.client("sk_test_...",
      api_version: "2026-01-28.clover",
      stripe_account: "acct_...",
      max_retries: 3
    )

## Summary

### Functions

client(api_key, opts \\ [])

Create a new Stripe client.

version()

Returns the library version.

## Functions

# client(api_key, opts \\ [])

    @spec client(
      String.t(),
      keyword()
    ) :: StripeElixir.Client.t()

Create a new Stripe client.

## Options

- `:api_version` - Pin to a specific Stripe API version
- `:stripe_account` - Connected account ID for Stripe Connect
- `:stripe_context` - Stripe context header (V2)
- `:client_id` - OAuth client ID
- `:max_retries` - Maximum retry attempts (default: 2)
- `:open_timeout` - Connection timeout in ms (default: 30_000)
- `:read_timeout` - Read timeout in ms (default: 80_000)
- `:api_base` - Override API base URL
- `:connect_base` - Override Connect base URL
- `:uploads_base` - Override file uploads base URL
- `:finch` - Custom Finch instance name (default: `StripeElixir.Finch`)

# version()

    @spec version() :: String.t()

Returns the library version.