ajax post to c# mvc controller

ajax post to c# mvc controller

Hello

First time I've tried this, I am trying to make this ajax call do something before the form is submitted. 

It seems to be working fine as far as it hits my breakpoint inside the AddPostalCode controller, but the postal code in the controller is null. (I'm not getting the value correctly)  Any suggestions?  Thanks

Ajax Call:
  1.     <script>
  2.         $('#submitPayment').click(function (e) {
  3.            // TODO: Validate input

  4.             var billingAddress = {
  5.                 PostalCode: $('#PostalCode').val().trim()
  6.             };

  7.             $.ajax({
  8.                 type: "POST",
  9.                 url: "/Reservations/Payment/AddPostalCode",
  10.                 content: "application/json; charset=utf-8",
  11.                 dataType: "json",
  12.                 data: JSON.stringify(billingAddress),
  13.                 success: function (data) {
  14.                     alert(data);
  15.                 },
  16.                 error: function () {
  17.                     alert("error");
  18.                 }
  19.             });
  20.         });
  21.     </script>
Controller code:

  1. public class Data
  2.         {
  3.             public string PostalCode { get; set; }
  4.         }
  5.         [HttpPost]
  6.         public JsonResult AddPostalCode(Data data)
  7.         {
  8.             var postalCode = data.PostalCode;
  9.             // do stuff
  10.             return Json(String.Format("'Success': 'true'"));
  11.         }