#learner - ReactJS

1 messages · Page 1 of 1 (latest)

outer lichen
hollow crane
#

Thanks @outer lichen or may be a general example which has both the API implementations available?

outer lichen
hollow crane
#

When trying to create a Payment Intent, we specify the amount we intent to charge a param. What happens if user applies a discount code later - would we have to update the value in the created payment intent before charging it?

#

Is there a param available in confirmPayment to charge the customer a different amount, less than the original amount shared while creating the Payment Intent?

#

@outer lichen

outer lichen
#

Okay so what are you trying to build out?

#

So you create the PaymentIntent server side with an amount. Then, during the user interaction you want then to be able to apply a discount code?

hollow crane
#

yes

outer lichen
#

Well...you can update the paymentIntent to a new amount

#

But paymentIntents don't support the concept of a coupon in and of themselves. It would be up to you to handle that in your integration.

hollow crane
#

ok. Also, after the payment is successful, is there a way to get information like first-6 digits/last 4 digits etc of Credit Card entered by customer?

outer lichen