#avneetsingh_11747

1 messages · Page 1 of 1 (latest)

tepid daggerBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

opaque trellis
wanton pilot
#

Yes, in dashboard I can see that the amount metadata got logged in with updated amount i.e., 2500$ but when I print the payment intent object it is still showing original amount of 2000$ which doesnt solve my purpose of updating the payment intent object in case amount changes 😦

#

However, if I change it to below code it works:

PaymentIntentUpdateParams params = PaymentIntentUpdateParams.builder()
.setAmount(request.getAmount())
.build();

opaque trellis
#

Sure but did you check the request it generated?

#

Id req_xxx from the log

#

What do you see in its parameters?

wanton pilot
#

I found the solution. So basically I was setting the amount metadata that was showing up in my Stripe dashboard but as I actually wanted to update the amount I dont need to use metadata for that so below logic worked:

PaymentIntentUpdateParams params = PaymentIntentUpdateParams.builder()
.setAmount(request.getAmount()).putAllMetadata(metadata)
.build();

#

This way i am able to update the amount in payment intent object as well as update the metadata object for Stripe dashboard. Both are different things and just by updating metadata wont actually update the payment intent object, right???

opaque trellis
#

Yes correct

#

Those are different properties of the PaymentIntent object