Submit a customer's business documents to Meta for business verification.
A portfolio gets 3 attempts. Each submission carries 1 to 3 PDF, JPEG or PNG documents of 5 MB or less.
Summary
Functions
Sends documents to Meta.
Gets the verification status, eligibility, attempts and latest submission.
Gets a submission with its documents and Meta's rejection reasons.
Lists your project's submissions for the portfolio, newest first. Params: limit, before, after.
Types
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
Functions
@spec create_submission(KapsoEx.Client.t(), String.t(), [map()], String.t()) :: result()
Sends documents to Meta.
Each document is a map with :roles (for example ["legal_name"] or
["address"]) and either:
:source_url- an HTTPS URL Kapso downloads, or:file-{content, filename: "certificate.pdf", content_type: "application/pdf"}, sent as multipart.
idempotency_key is required: after a timeout, retry with the same key
and the same documents. Use a new key only for a new attempt, and never
while the state is outcome_unknown.
202 means Kapso accepted the request, not that Meta verified the
business; check state and poll get_submission/3.
key = "verification-" <> portfolio_id <> "-1"
BusinessVerification.create_submission(client, portfolio_id, [
%{source_url: "https://files.example.com/certificate.pdf", roles: ["legal_name"]},
%{file: {File.read!("statement.pdf"), filename: "statement.pdf"}, roles: ["address"]}
], key)
@spec get(KapsoEx.Client.t(), String.t()) :: result()
Gets the verification status, eligibility, attempts and latest submission.
@spec get_submission(KapsoEx.Client.t(), String.t(), String.t()) :: result()
Gets a submission with its documents and Meta's rejection reasons.
@spec list_submissions(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists your project's submissions for the portfolio, newest first. Params: limit, before, after.