Webhook Endpoint - C#
This example project can be used to receive webhooks from Marketplacer, demonstrating a number of important use-cases.
less than a minute
Overview
In this c# / .NET project we stand up a webhook endpoint that receives webhooks from Marketplacer and:
- Lists the headers attached to a Marketplacer webhook
- Demonstrates how you can add custom headers to enable simple authentication
- Sends back a http error code of your choice
- Demonstrates how HMAC can be used to ensure payload validity
- Demonstrates how you can ensure you process webhooks “in-sequence”
- Demonstrates how you can parse the body payload
- Demonstrates how you can understand what has changed between events
Solution Components
Component | Description |
---|---|
Language | C# |
Runtime | .NET (v8+) |
Marketplacer API | N/a |
Webhooks used | Operator or Seller Webhooks |
Data Storage | Sqlite |
Dependencies | JsonDiffPatch.Net |
microsoft.entityframeworkcore.sqlite | |
microsoft.entityframeworkcore.design | |
Newtonsoft.Json |
Getting Started
The code for this project can be found here, along with a detailed readme that helps you to get up and running quickly.
Companion Video
We also have a companion video that takes you through initial application set up, and demonstrates 2 of the 7 example uses-cases.
You can find the video in the seller video collection here.