Forum Academy Marketplace Showcase Pricing Features

Stripe Plugin: Adds zeros to a price

I store price of an item as a Number. When Stripe charges the Test Card (4242 4242 4242 4242) it adds double zeros to the price. Instead of 25 it charges 2500. Any solutions?

EDIT:
So the Price is 25.
When user clicks PAY → Stripe Plugin’s prompt pops up to get the user’s card information.
This popup displays the Price. Instead of 25 it says $25.00. Which is normal. BUT in the backend it saves a PMT amount as 2500.

I tried to pass “Item Price/100” to Stripe. Unfortunately, in this case it displays, $0.25 in the popup.

Could it be that it charges the right amount, just stores the wrong way in the DB?
I’m pretty sure this is the case. Probably, Stripe returns the amount to be 25.00. But the Field type is Number so it ignores the “.”. Anyway post-success amount can be a text. I just need to display it in the Transactions page…

EDIT2:
Changing Field Type to Text didn’t help whatsoever.

Stripe (and probably most payment processors) always use integers for payment values, which means using cents rather than dollars (or pence instead of pounds, or the equivalent for other currencies).

So $25 dollars is 2500 cents.

If you want to save it in your database in dollars you can divide it by 100 on the back end.

Good to know. Thanks @adamhholmes :fist:

1 Like