ClearBank.EmbeddedBanking.Kyc (ClearBank v1.0.0)

Copy Markdown View Source

KYC (Know Your Customer) status management for embedded banking customers.

KYC states

  • "Pending" — KYC not yet submitted
  • "InProgress" — KYC submitted, under review
  • "Approved" — customer passes KYC, can use financial products
  • "Rejected" — customer fails KYC
  • "RequiresAction" — additional documents or information required

Webhooks

ClearBank fires a CustomerKycStatusChanged webhook when KYC state transitions. Subscribe and handle this in ClearBank.Webhook.Handler to update your records.

Examples

{:ok, kyc} = ClearBank.EmbeddedBanking.Kyc.get_status(client, "cust-uuid")
# => %{"status" => "Approved", "updatedAt" => "2024-01-15T10:00:00Z"}

{:ok, _} = ClearBank.EmbeddedBanking.Kyc.submit(client, "cust-uuid", %{
  id_document_type: "Passport",
  id_document_number: "123456789",
  id_document_expiry: "2030-01-01",
  id_document_country: "GB"
})

Summary

Functions

Returns the current KYC status for a customer.

Submits or updates KYC data for a customer.

Functions

get_status(client, customer_id)

@spec get_status(ClearBank.Client.t(), String.t()) :: ClearBank.HTTP.result()

Returns the current KYC status for a customer.

submit(client, customer_id, params)

Submits or updates KYC data for a customer.

Required params

  • :id_document_type - e.g. "Passport", "DrivingLicence", "NationalId"
  • :id_document_number - document number
  • :id_document_expiry - ISO 8601 date
  • :id_document_country - ISO 3166-1 alpha-2 issuing country

Optional params

  • :additional_documents - list of additional document maps
  • :source_of_funds - e.g. "Employment", "Business", "Savings"
  • :pep_status - boolean, politically exposed person flag
  • :sanctions_check - boolean