Uncaught StripeErrorInvalidRequest: Amount must be at least 50 cents
Stripe expects amounts in cents/pence, so if you pass amount as amount = 10
This will be considered as 10 pence instead of 10 USD.
So when Stripe gets pence lower than 50 it generates that error.
How to send USD instead of pence
You need to convert your amount to USD by multiplying it by 100
$amount = $amount * 100;