Stripe.Identity.VerificationSession (stripity_stripe v2.17.3) View Source

Work with Stripe Identity VerificationSession objects.

You can:

  • Create a Verification Session.
  • List all Verification Sessions.
  • Retrieve a verification session with a specified id.
  • Update a Verification Session.
  • Cancel a Verification Session.
  • Redact a Verification Session.

Stripe API reference: https://stripe.com/docs/api/identity/verification_sessions

Link to this section Summary

Functions

Cancel a VerificationSession.

Create a VerificationSession

Returns a list of VerificationSessions

Redact a VerificationSession to remove all collected information from Stripe.

Retrieves the details of a VerificationSession that was previously created.

Updates a VerificationSession.

Link to this section Types

Specs

last_error() :: %{code: [String.t()], reason: String.t()}

Specs

options() :: %{
  document: %{
    allowed_types: [String.t()],
    require_id_number: boolean(),
    require_live_capture: boolean(),
    require_matching_selfie: boolean()
  },
  id_number: map()
}

Specs

redaction() :: %{status: String.t()}

Specs

t() :: %Stripe.Identity.VerificationSession{
  client_secret: String.t() | nil,
  created: Stripe.timestamp(),
  id: Stripe.id(),
  last_error: last_error() | nil,
  last_verification_report: String.t(),
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  options: options(),
  redaction: redaction() | nil,
  status: String.t(),
  type: String.t(),
  url: String.t() | nil,
  verified_outputs: verified_outputs() | nil
}

Specs

verified_outputs() :: %{
  address: %{
    city: String.t(),
    country: String.t(),
    line1: String.t(),
    line2: String.t(),
    postal_code: String.t(),
    state: String.t()
  },
  dob: %{day: integer(), month: integer(), year: integer()},
  first_name: String.t(),
  id_number: String.t(),
  id_number_type: String.t(),
  last_name: String.t()
}

Link to this section Functions

Specs

cancel(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Cancel a VerificationSession.

Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
       :type => String.t(),
       optional(:metadata) => Stripe.Types.metadata(),
       optional(:options) => options(),
       optional(:return_url) => String.t()
     }

Create a VerificationSession

Link to this function

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

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       optional(:created) => Stripe.date_query(),
       optional(:status) => String.t(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:starting_after) => t() | Stripe.id()
     }

Returns a list of VerificationSessions

Specs

redact(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Redact a VerificationSession to remove all collected information from Stripe.

Link to this function

retrieve(id, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieves the details of a VerificationSession that was previously created.

When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.

Link to this function

update(id, params \\ %{}, opts \\ [])

View Source

Specs

update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
       optional(:metadata) => Stripe.Types.metadata(),
       optional(:options) => options(),
       optional(:type) => String.t()
     }

Updates a VerificationSession.

When the session status is requires_input, you can use this method to update the verification check and options.