title: Stripe with Java Spring RestController - webhook error 404 Invalid encoding: ISO-8859-1
body: <p>I'm making simple webhook with Spring RestController for Stripe, just to log events, it looks like this:</p>
  <pre><code>@RestController
  @CrossOrigin(origins = &quot;*&quot;)
  @RequestMapping(&quot;/stripe&quot;)
  public class StripeChargeSucceededController {
  
      @PostMapping(value = &quot;/chargeSucceeded&quot;, consumes = MediaType.APPLICATION_JSON_VALUE)
      public ResponseEntity&lt;Void&gt; chargeSucceeded(HttpServletRequest request, HttpServletResponse response, @RequestBody String json) {
          System.out.println(&quot;INCOMING TEST STRIPE REQUEST&quot;);
          System.out.println(json);
          return ResponseEntity.accepted().build();
      }
  }
  </code></pre>
  <p>I've made test requests to the server with Postman, got 204 accepted response and json logged as expected, but when I'm testing with Stripe I get:</p>
  <blockquote>
  <p>Test webhook error: 404 Invalid encoding: ISO-8859-1</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/5tLVs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5tLVs.png" alt="enter image description here" /></a>
  What am I missing here ?</p>