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

Copy Markdown View Source

Setu Bank Account Verification (BAV / penny-drop) client.

Credits ₹1 to the target account to confirm it exists and retrieve the registered account holder name.

Two modes:

  • Sync — single blocking call, result returned immediately
  • Async — initiate then poll / receive webhook

Setu docs: https://docs.setu.co/data/bav

Summary

Functions

Retrieves the result of an async BAV request.

Initiates an async penny-drop. Poll get_async_status/2 for the result.

Performs a synchronous penny-drop verification.

Functions

get_async_status(cfg, id)

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

Retrieves the result of an async BAV request.

GET /api/verify/ban/async/:id

verify_async(cfg, params)

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

Initiates an async penny-drop. Poll get_async_status/2 for the result.

POST /api/verify/ban/async

verify_sync(cfg, params)

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

Performs a synchronous penny-drop verification.

Required params

  • :account_number, :ifsc

POST /api/verify/ban/sync