Skip to content

Commit

Permalink
Return 202 Accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese authored Mar 12, 2024
1 parent 50d8d27 commit cde3906
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions checkout-example-advanced/Controllers/WebhookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public async Task<ActionResult<string>> Webhooks(NotificationRequest notificatio
// Process notification asynchronously.
await ProcessNotificationAsync(container.NotificationItem);

return Ok("[accepted]");
// Return a 202 status with an empty response body
return Accepted();
}
catch (Exception e)
{
Expand Down Expand Up @@ -82,4 +83,4 @@ private Task ProcessNotificationAsync(NotificationRequestItem notification)
return Task.CompletedTask;
}
}
}
}

0 comments on commit cde3906

Please sign in to comment.