SetuClient.Data.KYC.NameMatch (Setu Client v1.0.0)

Copy Markdown View Source

Setu Name Match API client.

Returns optimistic and pessimistic match scores for two name strings.

Score rangeMatch type
99–100%COMPLETE_MATCH
85–99%HIGH_PARTIAL_MATCH
70–85%MODERATE_PARTIAL_MATCH
45–70%LOW_PARTIAL_MATCH
0–45%NO_MATCH

Recommended starting threshold: 70–75%.

Setu docs: https://docs.setu.co/data/match-apis

Summary

Functions

Compares two names and returns optimistic / pessimistic match scores.

Returns true when the optimistic match percentage is >= threshold.

Returns true when the pessimistic match percentage is >= threshold.

Functions

match(cfg, params)

@spec match(SetuClient.Config.t(), map()) ::
  {:ok, map()} | {:error, SetuClient.Error.t()}

Compares two names and returns optimistic / pessimistic match scores.

Required params

  • :name1, :name2 — max 100 chars each; only ., ', - special chars allowed

POST /api/match/v1/name

match?(response, threshold \\ 75.0)

@spec match?(map(), number()) :: boolean()

Returns true when the optimistic match percentage is >= threshold.

strict_match?(response, threshold \\ 75.0)

@spec strict_match?(map(), number()) :: boolean()

Returns true when the pessimistic match percentage is >= threshold.