Stripe.Resources.Identity.VerificationSession (tiger_stripe v0.3.0)

Copy Markdown View Source

GelatoVerificationSession

A VerificationSession guides you through the process of collecting and verifying the identities of your users. It contains details about the type of verification, such as what verification check to perform. Only create one VerificationSession for each verification in your system.

A VerificationSession transitions through multiple statuses throughout its lifetime as it progresses through the verification flow. The VerificationSession contains the user's verified data after verification checks are complete.

Related guide: The Verification Sessions API

Summary

Types

last_error()

@type last_error() :: %{
  optional(:code) => String.t() | nil,
  optional(:reason) => String.t() | nil,
  optional(String.t()) => term()
}
  • code - A short machine-readable string giving the reason for the verification or user-session failure. Possible values: abandoned, consent_declined, country_not_supported, device_not_supported, document_expired, document_type_not_supported, document_unverified_other, email_unverified_other, email_verification_declined, id_number_insufficient_document_data, id_number_mismatch, id_number_unverified_other, phone_unverified_other, phone_verification_declined, selfie_document_missing_photo, selfie_face_mismatch, selfie_manipulated, selfie_unverified_other, under_supported_age. Nullable.
  • reason - A message that explains the reason for verification or user-session failure. Max length: 5000. Nullable.

options()

@type options() :: %{
  optional(:document) => options_document() | nil,
  optional(:email) => options_email() | nil,
  optional(:id_number) => map() | nil,
  optional(:matching) => options_matching() | nil,
  optional(:phone) => options_phone() | nil,
  optional(String.t()) => term()
}
  • document
  • email
  • id_number
  • matching
  • phone

options_document()

@type options_document() :: %{
  optional(:allowed_types) => [String.t()] | nil,
  optional(:require_id_number) => boolean() | nil,
  optional(:require_live_capture) => boolean() | nil,
  optional(:require_matching_selfie) => boolean() | nil,
  optional(String.t()) => term()
}
  • allowed_types - Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
  • require_id_number - Collect an ID number and perform an ID number check with the document’s extracted name and date of birth.
  • require_live_capture - Disable image uploads, identity document images have to be captured using the device’s camera.
  • require_matching_selfie - Capture a face image and perform a selfie check comparing a photo ID and a picture of your user’s face. Learn more.

options_email()

@type options_email() :: %{
  optional(:require_verification) => boolean() | nil,
  optional(String.t()) => term()
}
  • require_verification - Request one time password verification of provided_details.email.

options_matching()

@type options_matching() :: %{
  optional(:dob) => String.t() | nil,
  optional(:name) => String.t() | nil,
  optional(String.t()) => term()
}
  • dob - Strictness of the DOB matching policy to apply. Possible values: none, similar.
  • name - Strictness of the name matching policy to apply. Possible values: none, similar.

options_phone()

@type options_phone() :: %{
  optional(:require_verification) => boolean() | nil,
  optional(String.t()) => term()
}
  • require_verification - Request one time password verification of provided_details.phone.

provided_details()

@type provided_details() :: %{
  optional(:email) => String.t() | nil,
  optional(:phone) => String.t() | nil,
  optional(String.t()) => term()
}
  • email - Email of user being verified Max length: 5000.
  • phone - Phone number of user being verified Max length: 5000.

redaction()

@type redaction() :: %{
  optional(:status) => String.t() | nil,
  optional(String.t()) => term()
}
  • status - Indicates whether this object and its related objects have been redacted or not. Possible values: processing, redacted.

related_person()

@type related_person() :: %{
  optional(:account) => String.t() | nil,
  optional(:person) => String.t() | nil,
  optional(String.t()) => term()
}
  • account - Token referencing the associated Account of the related Person resource. Max length: 5000.
  • person - Token referencing the related Person resource. Max length: 5000.

t()

@type t() :: %Stripe.Resources.Identity.VerificationSession{
  client_reference_id: String.t(),
  client_secret: String.t(),
  created: integer(),
  id: String.t(),
  last_error: last_error(),
  last_verification_report:
    String.t() | Stripe.Resources.Identity.VerificationReport.t(),
  livemode: boolean(),
  metadata: %{required(String.t()) => String.t()},
  object: String.t(),
  options: options(),
  provided_details: provided_details() | nil,
  redaction: redaction(),
  related_customer: String.t(),
  related_customer_account: String.t(),
  related_person: related_person() | nil,
  status: String.t(),
  type: String.t(),
  url: String.t(),
  verification_flow: String.t() | nil,
  verified_outputs: verified_outputs() | nil
}
  • client_reference_id - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. Max length: 5000. Nullable.
  • client_secret - The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more. Max length: 5000. Nullable.
  • created - Time at which the object was created. Measured in seconds since the Unix epoch. Format: Unix timestamp.
  • id - Unique identifier for the object. Max length: 5000.
  • last_error - If present, this property tells you the last error encountered when processing the verification. Nullable. Expandable.
  • last_verification_report - ID of the most recent VerificationReport. Learn more about accessing detailed verification results. Nullable. Expandable.
  • livemode - Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • metadata - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • object - String representing the object's type. Objects of the same type share the same value. Possible values: identity.verification_session.
  • options - A set of options for the session’s verification checks. Nullable. Expandable.
  • provided_details - Details provided about the user being verified. These details may be shown to the user. Nullable. Expandable.
  • redaction - Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. Nullable. Expandable.
  • related_customer - Customer ID Max length: 5000. Nullable.
  • related_customer_account - The ID of the Account representing a customer. Max length: 5000. Nullable.
  • related_person - Expandable.
  • status - Status of this VerificationSession. Learn more about the lifecycle of sessions. Possible values: canceled, processing, requires_input, verified.
  • type - The type of verification check to be performed. Possible values: document, id_number, verification_flow.
  • url - The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe. Max length: 5000. Nullable.
  • verification_flow - The configuration token of a verification flow from the dashboard. Max length: 5000.
  • verified_outputs - The user’s verified data. Nullable. Expandable.

verified_outputs()

@type verified_outputs() :: %{
  optional(:address) => Stripe.Resources.Address.t() | nil,
  optional(:dob) => verified_outputs_dob() | nil,
  optional(:email) => String.t() | nil,
  optional(:first_name) => String.t() | nil,
  optional(:id_number) => String.t() | nil,
  optional(:id_number_type) => String.t() | nil,
  optional(:last_name) => String.t() | nil,
  optional(:phone) => String.t() | nil,
  optional(:sex) => String.t() | nil,
  optional(:unparsed_place_of_birth) => String.t() | nil,
  optional(:unparsed_sex) => String.t() | nil,
  optional(String.t()) => term()
}
  • address - The user's verified address. Nullable.
  • dob - The user’s verified date of birth. Nullable.
  • email - The user's verified email address Max length: 5000. Nullable.
  • first_name - The user's verified first name. Max length: 5000. Nullable.
  • id_number - The user's verified id number. Max length: 5000. Nullable.
  • id_number_type - The user's verified id number type. Possible values: br_cpf, sg_nric, us_ssn. Nullable.
  • last_name - The user's verified last name. Max length: 5000. Nullable.
  • phone - The user's verified phone number Max length: 5000. Nullable.
  • sex - The user's verified sex. Possible values: [redacted], female, male, unknown. Nullable.
  • unparsed_place_of_birth - The user's verified place of birth as it appears in the document. Max length: 5000. Nullable.
  • unparsed_sex - The user's verified sex as it appears in the document. Max length: 5000. Nullable.

verified_outputs_dob()

@type verified_outputs_dob() :: %{
  optional(:day) => integer() | nil,
  optional(:month) => integer() | nil,
  optional(:year) => integer() | nil,
  optional(String.t()) => term()
}
  • day - Numerical day between 1 and 31. Nullable.
  • month - Numerical month between 1 and 12. Nullable.
  • year - The four-digit year. Nullable.

Functions

expandable_fields()

object_name()