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

Sabbir345's avatar

Received unknown parameter: amount_decimal

Why stripe payment decimal amount getting an error

my code

Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));

    Stripe\Charge::create ([
        "amount_decimal"          => $this->request->finalAmount,
        "currency"         => "GBP",
        "source"             => $this->request->token,
        "description"      => "Test payment."
    ]);
0 likes
4 replies
Sti3bas's avatar
Sti3bas
Best Answer
Level 53

@sabbir345 amount_decimal parameter is not supported when creating a charge. Use amount instead:

Stripe\Charge::create([
   "amount" => intval($this->request->finalAmount * 100), // multiply by 100 if finalAmount is not in cents
   "currency" => "GBP",
   "source" => $this->request->token,
   "description" => "Test payment."
]);

https://stripe.com/docs/api/charges/create

Please or to participate in this conversation.