Table of Contents

Class WebhookController

Namespace
SEBT.Portal.Api.Controllers.IdProofing
Assembly
SEBT.Portal.Api.dll

Controller for receiving Socure webhook notifications. Anonymous — Socure calls this endpoint, not an authenticated user. Protected by webhook signature validation.

[ApiController]
[Route("api/socure")]
[AllowAnonymous]
[EnableRateLimiting("webhook-policy")]
public class WebhookController : ControllerBase
Inheritance
object
ControllerBase
WebhookController

Constructors

WebhookController(SocureSettings, ILogger<WebhookController>)

Controller for receiving Socure webhook notifications. Anonymous — Socure calls this endpoint, not an authenticated user. Protected by webhook signature validation.

public WebhookController(SocureSettings socureSettings, ILogger<WebhookController> logger)

Parameters

socureSettings SocureSettings
logger ILogger<WebhookController>

Methods

HandleWebhook(WebhookPayload, ICommandHandler<ProcessWebhookCommand>, CancellationToken)

Receives a Socure evaluation_completed webhook. Always returns 200 OK to prevent Socure retries, even if processing fails internally.

[HttpPost("webhook")]
[ProducesResponseType(200)]
public Task<IActionResult> HandleWebhook(WebhookPayload payload, ICommandHandler<ProcessWebhookCommand> handler, CancellationToken cancellationToken)

Parameters

payload WebhookPayload

The Socure webhook payload.

handler ICommandHandler<ProcessWebhookCommand>

The command handler.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IActionResult>