View Source Stripe.Apps.Secret (stripity_stripe v3.2.0)
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 or replace a secret in the secret store.
Deletes a secret from the secret store by name and scope.
Finds a secret in the secret store by name and scope.
List all secrets stored on the given scope.
Types
@type scope() :: %{optional(:type) => :account | :user, optional(:user) => binary()}
@type t() :: %Stripe.Apps.Secret{ created: integer(), deleted: boolean(), expires_at: integer() | nil, id: binary(), livemode: boolean(), name: binary(), object: binary(), payload: binary() | nil, scope: term() }
The apps.secret type.
createdTime at which the object was created. Measured in seconds since the Unix epoch.deletedIf true, indicates that this secret has been deletedexpires_atThe Unix timestamp for the expiry time of the secret, after which the secret deletes.idUnique identifier for the object.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.nameA name for the secret that's unique within the scope.objectString representing the object's type. Objects of the same type share the same value.payloadThe plaintext secret value to be stored.scope
Functions
@spec create( params :: %{ optional(:expand) => [binary()], optional(:expires_at) => integer(), optional(:name) => binary(), optional(:payload) => binary(), optional(:scope) => scope() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Create or replace a secret in the secret store.
Details
- Method: 
post - Path: 
/v1/apps/secrets 
@spec delete_where( params :: %{ optional(:expand) => [binary()], optional(:name) => binary(), optional(:scope) => scope() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Deletes a secret from the secret store by name and scope.
Details
- Method: 
post - Path: 
/v1/apps/secrets/delete 
@spec find( params :: %{ optional(:expand) => [binary()], optional(:name) => binary(), optional(:scope) => scope() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Finds a secret in the secret store by name and scope.
Details
- Method: 
get - Path: 
/v1/apps/secrets/find 
@spec list( params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:scope) => scope(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
List all secrets stored on the given scope.
Details
- Method: 
get - Path: 
/v1/apps/secrets