decoding stripe json with json_decode not working

By : Tom

I have json from stripe and I am trying to decode it json_decode.

I am not getting an error. Just nothing is returning. I am getting the data back from stripe, I just cant decode it.


// retrieve the request's body and parse it as JSON
$body = @file_get_contents('php://input');

$event_json = json_decode($body,true);

Any ideas?

By : Tom


Here, I ran this:

By : citruspi

The php://input stream allows you to read raw data from the request body. This data will be a string and depending on what sort of values are in the request, will look something like:


This video can help you solving your question :)
By: admin