View Source Stripe.EphemeralKey (Striped v0.2.0)

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(client, params \\ %{})

View Source
@spec create(
  client :: term(),
  params :: %{
    optional(:customer) => :string,
    optional(:expand) => [:string],
    optional(:issuing_card) => :string
  }
) :: {: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(client, key, params \\ %{})

View Source
@spec delete(
  client :: term(),
  key :: binary(),
  params :: %{optional(:expand) => [:string]}
) ::
  {: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}