#.abishek
1 messages · Page 1 of 1 (latest)
Hi there!
Hi
You mean you want to update an existing Price to chane its amount?
That's not possible, you cannot change the amount of an existing price. You would need to create a new price instead.
is there a way to set the new price as the default price on the product when creating it?
No, you'll need a separate API call to update the Product with the new default_price: https://stripe.com/docs/api/products/update?lang=node#update_product-default_price
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?
Are you creating the PaymentIntent directly yourself with the API?
yes
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.
The dropdown on that page, is that the country of the Stripe Account?
Yes
What does that mean exactly? Coupons for what?
When I use WebElements to create a Payment Element, is there a way to show "Apply Coupon"?
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.
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?
PaymentIntent don't suport coupons. You'll just reduce the amount of the PaymentIntent depending on your own logic.
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?
If you are using Checkout Session to collect payments information and the coupon, yes. Otherwise, no.
ok