Search documentation of stripe_elixir

# StripeElixir.Services.Apps.SecretService (stripe_elixir v0.1.0)

Copy Markdown View Source

SecretServiceResourceSecret

Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.

The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.

All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.

A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.

Related guide: Store data between page reloads

## Summary

### Functions

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

Set a Secret

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

Delete a Secret

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

Find a Secret

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

List secrets

## Functions

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

    @spec create(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Set a Secret

Create or replace a secret in the secret store.

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

    @spec delete_where(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Delete a Secret

Deletes a secret from the secret store by name and scope.

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

    @spec find(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Find a Secret

Finds a secret in the secret store by name and scope.

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

    @spec list(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

List secrets

List all secrets stored on the given scope.