Moov.Files (Moov v1.0.0)

Copy Markdown View Source

Upload and list supporting documents for KYC/underwriting (e.g. a photo ID, a bank statement, a W-9).

Limits: 20 MB max per file, 50 files max per account, and only CSV, JPG, PDF, or PNG content types are accepted.

See https://docs.moov.io/api/moov-accounts/files/.

Summary

Functions

Retrieves metadata about a single uploaded file.

Lists files uploaded for an account.

Uploads a file for an account.

Functions

get(client, account_id, file_id)

@spec get(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves metadata about a single uploaded file.

list(client, account_id, opts \\ [])

@spec list(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists files uploaded for an account.

upload(client, account_id, file_binary, opts)

@spec upload(Moov.Client.t(), String.t(), binary(), keyword()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Uploads a file for an account.

Moov.Files.upload(client, account_id, File.read!("license.png"),
  filename: "license.png",
  content_type: "image/png"
)

Options

  • :filename - required
  • :content_type - required, one of "text/csv", "image/jpeg", "application/pdf", "image/png"