#mrelliot69

1 messages · Page 1 of 1 (latest)

main moatBOT
jolly barn
#

👋 how may I help?

#

you can use Checkout Sessions or Invoices

#

then you can use Invoices

#

you can use PaymentIntents, but they only provide a way of passing an amount, and not a product ID. you can then add some metadata if you want

#

to identify which product/service the payment was made for

bitter forum
#

Hi! I'm taking over my colleague. Please, let me know if you have any other questions.

lean onyxBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

bitter forum
#

Yes. You can use the unit_amount

plucky yarrow
#

what its the difference between unit_amount and the unit_amount_decimal?

#

?

bitter forum
plucky yarrow
#

what i want to know is which one should i use then charding , because if the amount specifie on the product is decimal the unit_amount will have an incorrect value since its an integer or not?

#

that is what i want to confirm

bitter forum
#

You should use unit_amount in most cases. if you want to charge $100, set unit_amount: 10000.

plucky yarrow
#

the products are created via stripe dashboard

#

thats why im trying to confirm which property should i use

main moatBOT
bitter forum
#

unit_amount is the one.

plucky yarrow
#

i retrive the object and both are filled with the same value, thats why i im question why i can use the dicmal one? does stripe have any problem or not set it sometimes?

bitter forum
#

It might work differently for other currencies.

plucky yarrow
#

what u mean with that, can you please eleborate?

#

?

lyric remnant
#

Hey! Taking over for my colleague. Let me catch up.

plucky yarrow
#

ok ty, i will wait

lyric remnant
#

I'm not sure I understand what is the main issue you are facing ?

#

You want to use what attribute ?

plucky yarrow
#

its not an issue im just trying to understand which atribute i can rely on the create a charge based on the product value of stripe
unit_amount or the unit_amount_decimal

lyric remnant
#

use unit_amount: A non-negative integer in cents representing how much to charge.

plucky yarrow
#

ok perfect