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

JesseLaravel96's avatar

Stripe API request does not work in Postman

Hello,

So I tried to test the stripe API with Postman, but I got the following error:

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: The POST method is not supported for this route. Supported methods: GET, HEAD. in file C:\xampp\htdocs\mediumplein\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php on line 118

This is my route:

Route::post('stripe', [App\Http\Controllers\StripePaymentController::class, 'stripePost']);

This is my Controller:

0 likes
1 reply
click's avatar

What is the URL you are trying to call? The error you show is an error from your laravel installation, not from the stripe API.

Did you also take into account that you disable CSRF tokens? This is done by default in laravel if you add your routes to api.php which uses the api middleware. Otherwise you have to add your route to the excludedRoutes in the VerifyCsrfToken middleware, more about this can be found in the documentation: https://laravel.com/docs/9.x/csrf#csrf-excluding-uris

Please or to participate in this conversation.