0

I'm currently trying to implement a payment system using Stripe. After a payment, Stripe sends a webhook containing information about the purchase. However, before even a single line of php code is executed (the first line is a log, which doens't execute), it throws an error. My server gives "AH01225: Error reading request entity data" and Stripe receives error 400 with response "Invalid encoding: ISO-8859-1".

I have narrowed the problem down a bit. When I make a post request to my endpoint containing the same body as the failed webhook, I do get the same errors. After removing the two json elements containing emails (as strings) it works fine.

Inside my .htaccess file I have the line "AddDefaultCharset utf-8", so I don't get where it gets the encoding error from.

The weird thing is, is that it all of a sudden it worked for like 2 days. But now, without changing anything that I can think of that could influence this, it stopped working.

1
  • "Invalid encoding: ISO-8859-1" means that Stripe is unable to read the response body in ISO-8859-1 returned from your server as it only accepts response in UTF-8. The actual error isn't due to invalid coding. The error information should be inside the response body in ISO-8859-1 from the your server. Commented May 29 at 21:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.