StripeElixir.OAuth (stripe_elixir v0.1.0)

Copy Markdown View Source

Stripe Connect OAuth helpers.

Convenience module that delegates to StripeElixir.Services.OAuthService.

Usage

client = StripeElixir.client("sk_test_...", client_id: "ca_...")

# Build authorization URL
{:ok, url} = StripeElixir.OAuth.authorize_url(client)

# Exchange code for token
{:ok, resp} = StripeElixir.OAuth.token(client, %{"grant_type" => "authorization_code", "code" => "ac_..."})

# Revoke access
{:ok, resp} = StripeElixir.OAuth.deauthorize(client, %{"stripe_user_id" => "acct_..."})

Summary

Functions

authorize_url(client, params \\ %{}, opts \\ [])

See StripeElixir.Services.OAuthService.authorize_url/3.

deauthorize(client, params \\ %{}, opts \\ [])

See StripeElixir.Services.OAuthService.deauthorize/3.

token(client, params \\ %{}, opts \\ [])

See StripeElixir.Services.OAuthService.token/3.