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

deladels's avatar

404 Not found when get response from API

I am making a request to a payment API. When this is done, the payment provider attaches some values as a response after a call to the API.

this is my route in web.php

Route::get('payments/confirmation/{response}/', 'PaymentController@confirm')->name('payments.confirm');

this is the response:

http://127.0.0.1:8000/payments/confirmation/?status=approved&code=000&reason=Transaction successful!&transaction_id=e19

now I am trying to get the response data but I keep getting a 404 Not found error after a redirect to the:

payments/confirmation route.

here is my controller, I am just doing a dd for now:

 public function confirm(Request $request, $response)
    { 
        dd($response);
	
}

what could be the issue?

0 likes
3 replies

Please or to participate in this conversation.