Class ProcessWebhookCommand
- Namespace
- SEBT.Portal.UseCases.IdProofing
- Assembly
- SEBT.Portal.UseCases.dll
Command to process an incoming Socure webhook notification. The webhook is received anonymously and verified by signature.
public class ProcessWebhookCommand : ICommand
- Inheritance
-
objectProcessWebhookCommand
- Implements
Properties
DocumentDecision
The document verification decision value from Socure's data_enrichments. Kept for diagnostic logging; routing decisions use WorkflowDecision.
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string? DocumentDecision { get; init; }
Property Value
- string
DocumentVerificationReasonCodes
Socure DocV reason codes from the documentVerification enrichment, when present. Used to detect egregious failures that trigger immediate rejection without DocV step-up.
public IReadOnlyList<string>? DocumentVerificationReasonCodes { get; init; }
Property Value
- IReadOnlyList<string>
EvalId
The Socure evaluation ID for challenge correlation (fallback key).
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string? EvalId { get; init; }
Property Value
- string
EventId
The Socure event ID. Used for idempotency — if already processed, return success.
[Required(ErrorMessage = "EventId is required.")]
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string EventId { get; init; }
Property Value
- string
EventType
The Socure webhook event type (e.g., "evaluation_completed", "evaluation_paused"). Paused events are intermediate and do not carry a terminal decision.
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string? EventType { get; init; }
Property Value
- string
ReferenceId
The Socure reference ID for challenge correlation (primary key).
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string? ReferenceId { get; init; }
Property Value
- string
WebhookSignature
The raw webhook signature header for validation. Placeholder validation in dev; enforced in non-dev.
public string? WebhookSignature { get; init; }
Property Value
- string
WorkflowDecision
The top-level workflow decision from Socure (e.g., "ACCEPT", "REJECT", "RESUBMIT", "REVIEW"). This is the authoritative routing decision: it reflects the full workflow outcome including Digital Intelligence signals, not just the DocV enrichment.
[RegularExpression("^[^\\p{Cc}]*$", ErrorMessage = "Field contains invalid control characters.")]
public string? WorkflowDecision { get; init; }
Property Value
- string