SetuClient (Setu Client v1.0.0)

Copy Markdown View Source

Production-grade Elixir client for the Setu API Platform.

Quick start

# config/config.exs
config :setu,
  client_id: System.get_env("SETU_CLIENT_ID"),
  client_secret: System.get_env("SETU_CLIENT_SECRET"),
  product_instance_id: System.get_env("SETU_PRODUCT_INSTANCE_ID"),
  environment: :sandbox

# In application code
cfg = SetuClient.config()

{:ok, qr} = SetuClient.Payments.UPI.create_dqr(cfg, merchant_id, %{
  merchant_vpa: "shop@pineaxis",
  amount: 10_000
})

Module index

ModulePurpose
SetuClient.Payments.UPIFlash/DQR/SQR, Collect, TPV, Mandates, Refunds, Disputes, Onboarding
SetuClient.Payments.BBPSBillCollect biller-side helpers
SetuClient.Payments.BillPayBBPS agent bill payment
SetuClient.Payments.WhatsAppWhatsApp Collect reminders
SetuClient.Data.AAAccount Aggregator FIU — consent + data fetch
SetuClient.Data.KYC.PANPAN verification (NSDL)
SetuClient.Data.KYC.BAVBank account verification (penny-drop)
SetuClient.Data.KYC.GSTGSTIN verification
SetuClient.Data.KYC.NameMatchOptimistic + pessimistic name matching
SetuClient.Data.KYC.EKYCAadhaar eKYC
SetuClient.Data.KYC.DigiLockerDigiLocker session + document fetch
SetuClient.Data.ESignAadhaar eSign (up to 6 signers)
SetuClient.Webhook.HandlerDispatcher for all 25+ event types
SetuClient.Webhook.CallbacksBehaviour + use macro with defaults
SetuClient.ConfigConfiguration struct and helpers
SetuClient.ErrorStructured error type
SetuClient.ValidationShared client-side validation helpers

Summary

Functions

Returns a SetuClient.Config populated from application config.

Returns a SetuClient.Config from application config merged with keyword overrides.

Returns the SDK version string.

Functions

config()

@spec config() :: SetuClient.Config.t()

Returns a SetuClient.Config populated from application config.

config(overrides)

@spec config(keyword()) :: SetuClient.Config.t()

Returns a SetuClient.Config from application config merged with keyword overrides.

version()

@spec version() :: String.t()

Returns the SDK version string.