Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

monsterdream's avatar

How to test this stripe webHook ? And why it't not working

Hi, In my test i have simply method:

 $req =  $this->call('POST', '/stripe/webhook', ['name' => 'Something']);

function is reaching but somehow array is not attached:

In: WebhookController.php
public function handleWebhook(Request $request)
    {
//        dd($payload = json_decode($request->getContent(), true));  => here it throws null
        dd($request->getContent());   => here it throws ""
    }

I would like to test this webHook but I'm not able to send data. Where can it be a problem ?

0 likes
0 replies

Please or to participate in this conversation.