commercetools-dotnet-core-sdk-v2 icon indicating copy to clipboard operation
commercetools-dotnet-core-sdk-v2 copied to clipboard

How to create a HTTP Subscription with Extension Destination

Open DevonVejay opened this issue 2 years ago • 1 comments

I'm trying to create a webhook with this SDK to createa a "ProductCreated" Subscription event with this SDK but can't figure it out `

        // Create the client instance
        var client = new ClientFactory().Create(config);

        // Set up the subscription payload

        var httpDestination = new HttpDestination
        {
            Url = "https://mysite.dev/webhook",
        };

        // Set up the subscription payload
        var payload = new SubscriptionDraft
        {

            Destination = httpDestination,
            Changes = new { "ProductCreated" },
            Key = "product-created-subscription",
        };

` Any pointers appreciated

DevonVejay avatar May 05 '23 07:05 DevonVejay