#day-paymentintent-updateamount

1 messages · Page 1 of 1 (latest)

crimson shellBOT
#

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.

worldly geyser
#

It is linked with my earlier question

past talon
#

Hey @worldly geyser Each thread is "self contained". We can't spend time reading complex old threads to gather state as we help numerous people in parallel.

#

You can definitely call the modify() method server-side to change the amount

#

day-paymentintent-updateamount

worldly geyser
#

I was just saying the linked thread as Dingbot was mentioning that

#

How do I go about sending the payment_method details server-side?

#

from paymentelement

past talon
#

What does that mean "sending the payment method details"? Why would you "send" anything?

worldly geyser
#

from client to server

past talon
#

but why would you do any of this? Sorry you seem down a rabbit hole after some confusion. All you said earlier is taht you want to change the PaymentIntent amount right?

worldly geyser
#

correct, which i do this: stripe.PaymentIntent.modify(payment_intent, amount=total, metadata={"quantity": qty})

#

which errors out wanting a payment_method

past talon
#

Can you share an example request id req_123?

#

because this code should 100% work

worldly geyser
#

one second

#

ok, i just sent another one through, where do i get the req id?

#

i have a pi

#

pi_3O8QhWHWDxdn0UDv0K9jQpMA

#

in test

past talon
#

your code is passing payment_method: 'card'which is definitely not valid/correct

worldly geyser
#

let me create a new pi

#

sorry, that was an old one

#

pi_3O8S74HWDxdn0UDv08brRrMO

#

that's i new one that i was testing with

#

but still in test

past talon
worldly geyser
#

just ignore this?

#

also, is there anyway to update metadata fields without updating the entire metadata?
if i have

"metadata": {
"invoice_id": "abc123",
"quantity": "1"
}

can i just update the quantity without needing to resend the invoice_id?

past talon
#

Easiest is to try in Test mode which would give you the answer instantly

#

metadata is "merged" so you just pass new values, you don't have to re-pass everything

worldly geyser
#

ok thank you