#.abishek

1 messages · Page 1 of 1 (latest)

white estuaryBOT
unborn spoke
#

Hi there!

marsh sphinx
#

Hi

unborn spoke
#

You mean you want to update an existing Price to chane its amount?

marsh sphinx
#

yes

#

We have a UI on our app for our customers to update the amount

unborn spoke
#

That's not possible, you cannot change the amount of an existing price. You would need to create a new price instead.

marsh sphinx
#

is there a way to set the new price as the default price on the product when creating it?

unborn spoke
marsh sphinx
#

ok

#

when creating a payment intent is there a way to set the product/price for which the payment intent is being created along with the amount to charge the customer?

unborn spoke
#

Are you creating the PaymentIntent directly yourself with the API?

marsh sphinx
#

yes

unborn spoke
#

Got it. Then no, PaymentIntents only take an amount. But you could use the metadata field of the PaymentIntent to store additional information about the produce/price being sold.

marsh sphinx
#

ok

#

on the docs where can I find the list of currencies supported by Stripe?

unborn spoke
marsh sphinx
#

The dropdown on that page, is that the country of the Stripe Account?

unborn spoke
#

Yes

marsh sphinx
#

ok

#

does web elements support coupon codes?

unborn spoke
#

What does that mean exactly? Coupons for what?

marsh sphinx
#

When I use WebElements to create a Payment Element, is there a way to show "Apply Coupon"?

unborn spoke
#

Oh I see. When using PaymentIntent + Payment Element there's no built in way to use coupons. But that's something you could build yourself. Or use Checkout Session instad that does support coupons.

marsh sphinx
#

so if I build it on my own, then I need to set the coupon code when creating the payment intent. Is that how I apply the coupon?

unborn spoke
#

PaymentIntent don't suport coupons. You'll just reduce the amount of the PaymentIntent depending on your own logic.

marsh sphinx
#

ah ok

#

so we have to write the logic to get the amount to reduce if we use Stripe Coupons

#

is there a way to pass the amount and the coupon code and get the discount amount on the Stripe API?

unborn spoke
#

If you are using Checkout Session to collect payments information and the coupon, yes. Otherwise, no.

marsh sphinx
#

ok