View Source Stripe.EphemeralKey (stripity_stripe v3.1.1)

Link to this section Summary

Types

t()

The ephemeral_key type.

Functions

Creates a short-lived API key for a given resource.

Invalidates a short-lived API key for a given resource.

Link to this section Types

@type t() :: %Stripe.EphemeralKey{
  created: integer(),
  expires: integer(),
  id: binary(),
  livemode: boolean(),
  object: binary(),
  secret: binary()
}

The ephemeral_key type.

  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • expires Time at which the key will expire. Measured in seconds since the Unix epoch.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.
  • secret The key's secret. You can use this value to make authorized requests to the Stripe API.

Link to this section Functions

Link to this function

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

View Source
@spec create(
  params :: %{
    optional(:customer) => binary(),
    optional(:expand) => [binary()],
    optional(:issuing_card) => binary(),
    optional(:nonce) => binary(),
    optional(:verification_session) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Creates a short-lived API key for a given resource.

Details

  • Method: post
  • Path: /v1/ephemeral_keys
Link to this function

delete(key, params \\ %{}, opts \\ [])

View Source
@spec delete(
  key :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Invalidates a short-lived API key for a given resource.

Details

  • Method: delete
  • Path: /v1/ephemeral_keys/{key}