How can I capture JSON payloads on my C# WebAPI server?

I’m trying to bind a JSON payload in a C# WebAPI endpoint but the model remains null. Below is an alternate code example:

public class OrderDetails {
    public List<ItemDetail> Items { get; set; }
    public string Address { get; set; }
    public int Price { get; set; }
    public int CustomerId { get; set; }
}

public class ItemDetail {
    public int ProductId { get; set; }
    public string ProductName { get; set; }
    public int Quantity { get; set; }
    public int Cost { get; set; }
}

[HttpPost]
public bool ProcessOrder(OrderDetails details) {
    // Implementation here
    return true;
}

hey, have u looked into casing mismatch in u json payload? sometimes attribute binding goofes out, might be worth a try on explicit json property names. have u debugged it with any custom model binders, or what worked in similar cases?