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

poorni's avatar

Cashier throws error “A parameter provided in the URL (payment_method) was repeated as a GET or POST parameter.” while adding payment method

I am using cashier for stripe in laravel 7, getting this error while adding payment method. " A parameter provided in the URL (payment_method) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL." I am passing payment intent to the blade like this,

'intent' => $user->createSetupIntent()

In js,

cardButton.addEventListener('click', async (e) => { e.preventDefault(); const { setupIntent, error } = await stripe.confirmCardSetup( clientSecret, { payment_method: { card: cardElement, billing_details: { name: cardHolderName.value } } } ); if (error) {

// Display "error.message" to the user...

} else { send('save', false, { data: { payment_method: setupIntent }

});
// The card has been verified successfully...

}

});

then adding

$paymentMethod=$request['payment_method']; $user->updateDefaultPaymentMethod($paymentMethod); what is the meaning of this error?

0 likes
1 reply
poorni's avatar

It was a fault from my side,I passed complete setup intent instead of payment method in updateDefaultPaymentMethod.

Please or to participate in this conversation.