View Source ExOAPI.Stripe.SDK.Tokens (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Retrieves the token with the given ID.</p>

description: <p>Creates a single-use token that represents a bank account’s details. This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a <a href="#accounts">Custom account</a>.</p>

Link to this section Types

Link to this type

get_tokens_token_opts()

View Source
@type get_tokens_token_opts() :: {:expand, String.t()}

Link to this section Functions

Link to this function

get_tokens_token(client, token, opts \\ [])

View Source
@spec get_tokens_token(
  client :: ExOAPI.Client.t(),
  token :: String.t(),
  [get_tokens_token_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Token.t() | map()}
  | {:error, any()}

description: <p>Retrieves the token with the given ID.</p>

Link to this function

post_tokens(client, body)

View Source
@spec post_tokens(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      pii: %{id_number: String.t()},
      person: %{
        verification: %{
          document: %{front: String.t(), back: String.t()},
          additional_document: %{front: String.t(), back: String.t()}
        },
        ssn_last_4: String.t(),
        relationship: %{
          title: String.t(),
          representative: boolean(),
          percent_ownership: String.t() | number(),
          owner: boolean(),
          executive: boolean(),
          director: boolean()
        },
        political_exposure: String.t(),
        phone: String.t(),
        nationality: String.t(),
        metadata: String.t() | map(),
        maiden_name: String.t(),
        last_name_kanji: String.t(),
        last_name_kana: String.t(),
        last_name: String.t(),
        id_number: String.t(),
        gender: String.t(),
        full_name_aliases: String.t() | [String.t()],
        first_name_kanji: String.t(),
        first_name_kana: String.t(),
        first_name: String.t(),
        email: String.t(),
        documents: %{
          visa: %{files: [String.t()]},
          passport: %{files: [String.t()]},
          company_authorization: %{files: [String.t()]}
        },
        dob: String.t() | %{year: integer(), month: integer(), day: integer()},
        address_kanji: %{
          town: String.t(),
          state: String.t(),
          postal_code: String.t(),
          line2: String.t(),
          line1: String.t(),
          country: String.t(),
          city: String.t()
        },
        address_kana: %{
          town: String.t(),
          state: String.t(),
          postal_code: String.t(),
          line2: String.t(),
          line1: String.t(),
          country: String.t(),
          city: String.t()
        },
        address: %{
          state: String.t(),
          postal_code: String.t(),
          line2: String.t(),
          line1: String.t(),
          country: String.t(),
          city: String.t()
        }
      },
      expand: [String.t()],
      cvc_update: %{cvc: String.t()},
      customer: String.t(),
      card:
        String.t()
        | %{
            number: String.t(),
            name: String.t(),
            exp_year: String.t(),
            exp_month: String.t(),
            cvc: String.t(),
            currency: String.t(),
            address_zip: String.t(),
            address_state: String.t(),
            address_line2: String.t(),
            address_line1: String.t(),
            address_country: String.t(),
            address_city: String.t()
          },
      bank_account: %{
        routing_number: String.t(),
        currency: String.t(),
        country: String.t(),
        account_type: String.t() | :checking | :futsu | :savings | :toza,
        account_number: String.t(),
        account_holder_type: String.t() | :company | :individual,
        account_holder_name: String.t()
      },
      account: %{
        tos_shown_and_accepted: boolean(),
        individual: %{
          verification: %{
            document: %{front: String.t(), back: String.t()},
            additional_document: %{front: String.t(), back: String.t()}
          },
          ssn_last_4: String.t(),
          political_exposure: String.t() | :existing | :none,
          phone: String.t(),
          metadata: String.t() | map(),
          maiden_name: String.t(),
          last_name_kanji: String.t(),
          last_name_kana: String.t(),
          last_name: String.t(),
          id_number: String.t(),
          gender: String.t(),
          full_name_aliases: String.t() | [String.t()],
          first_name_kanji: String.t(),
          first_name_kana: String.t(),
          first_name: String.t(),
          email: String.t(),
          dob:
            String.t() | %{year: integer(), month: integer(), day: integer()},
          address_kanji: %{
            town: String.t(),
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          },
          address_kana: %{
            town: String.t(),
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          },
          address: %{
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          }
        },
        company: %{
          verification: %{document: %{front: String.t(), back: String.t()}},
          vat_id: String.t(),
          tax_id_registrar: String.t(),
          tax_id: String.t(),
          structure:
            String.t()
            | :free_zone_establishment
            | :free_zone_llc
            | :government_instrumentality
            | :governmental_unit
            | :incorporated_non_profit
            | :limited_liability_partnership
            | :llc
            | :multi_member_llc
            | :private_company
            | :private_corporation
            | :private_partnership
            | :public_company
            | :public_corporation
            | :public_partnership
            | :single_member_llc
            | :sole_establishment
            | :sole_proprietorship
            | :tax_exempt_government_instrumentality
            | :unincorporated_association
            | :unincorporated_non_profit,
          registration_number: String.t(),
          phone: String.t(),
          ownership_declaration_shown_and_signed: boolean(),
          ownership_declaration: %{
            user_agent: String.t(),
            ip: String.t(),
            date: integer()
          },
          owners_provided: boolean(),
          name_kanji: String.t(),
          name_kana: String.t(),
          name: String.t(),
          executives_provided: boolean(),
          directors_provided: boolean(),
          address_kanji: %{
            town: String.t(),
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          },
          address_kana: %{
            town: String.t(),
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          },
          address: %{
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          }
        },
        business_type:
          String.t() | :company | :government_entity | :individual | :non_profit
      }
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Token.t() | map()}
  | {:error, any()}

description: <p>Creates a single-use token that represents a bank account’s details. This token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a <a href="#accounts">Custom account</a>.</p>