Weavr.Consumers (Weavr v1.0.0)

Copy Markdown View Source

Consumer identities — individuals onboarded to the Weavr platform.

All paths and operations are verified against Weavr's published docs. The Consumer resource mirrors the Corporate resource but represents individuals (not companies), goes through KYC (not KYB), and has consumers instead of companies.

On Sandbox, email verification codes are always "123456" and emails are not actually sent.

The following details cannot be updated via the API once KYC is complete:

  • Root user name, surname, email, mobile, date of birth, nationality Contact Weavr support to restart due diligence if changes are needed.

Summary

Functions

Creates a new Consumer identity.

Retrieves the details of the logged-in consumer. GET /consumers.

Returns the KYC status for the logged-in consumer. GET /consumers/kyc.

Sends an email verification code to the consumer root user.

Initiates the KYC due diligence process for the logged-in consumer.

Updates the logged-in consumer's details. PATCH /consumers. KYC-locked fields are ignored after approval.

Verifies the consumer root user's email.

Functions

create(config, attrs, opts \\ [])

@spec create(Weavr.Config.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}

Creates a new Consumer identity.

POST /consumers — no auth_token required (uses api-key only).

Key required fields in attrs:

  • "profileId" — from Multi Portal > API Credentials
  • "rootUser" — object with name, surname, email, mobile (with countryCode and number), dateOfBirth
  • "ipAddress" — the end-user's IP address
  • "baseCurrency" — ISO 4217 code (e.g. "GBP", "EUR")

get(config, auth_token)

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

Retrieves the details of the logged-in consumer. GET /consumers.

get_kyc(config, auth_token)

@spec get_kyc(Weavr.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}

Returns the KYC status for the logged-in consumer. GET /consumers/kyc.

send_email_verification(config, auth_token)

@spec send_email_verification(Weavr.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}

Sends an email verification code to the consumer root user.

POST /consumers/verification/email/send — step 1 of email verification. On Sandbox the code is always "123456".

start_kyc(config, auth_token)

@spec start_kyc(Weavr.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}

Initiates the KYC due diligence process for the logged-in consumer.

POST /consumers/kyc — returns a reference to initialise the KYC UI Component embedded in your application.

update(config, auth_token, attrs)

@spec update(Weavr.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}

Updates the logged-in consumer's details. PATCH /consumers. KYC-locked fields are ignored after approval.

verify_email(config, auth_token, verification_code)

@spec verify_email(Weavr.Config.t(), String.t(), String.t()) ::
  :ok | {:error, Weavr.Error.t()}

Verifies the consumer root user's email.

POST /consumers/verification/email/verify — step 2. On Sandbox the code is always "123456". Returns 204 No Content on success.