Per-call options
The Go SDK is source-available on request and is not yet released: v2
has no tagged version and is not published to a module proxy, so go get
against the module path below will not resolve until it is. It covers OCR,
face, liveness and sessions; fraud detection and verification sessions are
not in it. Server-side integrations that need those today should call the
REST API directly or use the JavaScript SDK.
Every method accepts variadic RequestOption arguments for per-call
overrides:
result, err := client.Liveness.Check(ctx, req,
ekyc.WithIdempotencyKey("verification-"+verificationID),
ekyc.WithRequestID("req_audit_42"),
)
Available options
WithIdempotencyKey(key string)
Set the Idempotency-Key header for this call. No key is sent unless
you provide one.
client.Sessions.Create(ctx, req, ekyc.WithIdempotencyKey("user_42_session_2026-05-08"))
See Idempotency for when to set this.
WithRequestID(id string)
Pin the X-Request-Id for the FIRST attempt of this call. SDK retries
generate fresh request ids per attempt regardless.
client.OCR.Scan(ctx, req, ekyc.WithRequestID("req_my_correlation_id"))
WithAPIVersion(v string)
Override the API version pin for this call. Rare — you usually pin
once at Client config time.
client.OCR.Scan(ctx, req, ekyc.WithAPIVersion("2027-01-01"))
Combining
Options stack in order:
client.Face.Verify(ctx, req,
ekyc.WithIdempotencyKey("verify-"+id),
ekyc.WithAPIVersion("2026-04-26"),
)