#arvind_singh_21006
1 messages · Page 1 of 1 (latest)
you should never use the Charges API here, it's deprecated.
if you're asking why the amount is * 100 it's because in Stripe you specify the amount in the lowest currency unit(e.g 4237 means $42.37 (it's in cents)
can you define in depth
I can if you ask a specific question, what can I clarify exactly?
why we multiple by 100 ? in charge method on amount field ?
it's because in Stripe you specify the amount in the lowest currency unit(e.g 4237 means $42.37 (it's in cents)
when i check stripe dashboard payment there are showing customer paying 12 doller but on the dashboard showing 1200 doller ?why
do you have an example ch_xxx ID where that happened?
if you post the ID I might be able to have a look and tell you
you passed us 120000 which is 120000 cents, which is $1,200.00
so that means in your code your variable payment_detail['amt'] is 1200 for example. If you passed that without multiplying it by 100, it would be 1200 cents, which is $12.00
sorry i'm not understand this
what can I clarify?
how can i calculate it ? it would be 1200 cents, which is $12.00
to convert 12 doller
depends what amount you want to charge. What do you want?
i want to pass 12 doller then when i fatched my transaction then showing me 12 doller only
well then wherever you are getting the variable payment_detail['amt'] from, that already has calculated the correct value to be able to charge $12.00 (12 dollars) on Stripe.
so presumably you don't need to then multiply it by 100 so you should not do that.