#yunior-payment-intent
1 messages · Page 1 of 1 (latest)
thanks for help, but how can i do that? Should I use payment_method_data field while updating payment intent?
or update payment method separately using POST /v1/payment_methods/:id
Have you collected the new sofort PaymentMethod to an object with id pm_xxx?
Then you can call the Update PaymentIntent and specify the new Id at https://stripe.com/docs/api/payment_intents/update#update_payment_intent-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok so if I understand correctly, I should create new payment method via POST /v1/payment_methods and then provide collected payment method id to payment_method attribute in POST /v1/payment_intents/:id
Mostly. But generally you can't collect new paymentmethod by a backend call such as POST /v1/payment_methods. You would need to use client-side to collect
ok, thanks a lot for ur help
good luck!
@undone sage What's the question?
is there any way one can unset/reset payment method on payment intent?
It would depend on the status of the Payment Intent
status is requires_action
Sure, you'd just re-confirm the PI with a new Payment Method
Or I guess reading your original Q, you'd pass the payment_method parameter in your update call
It's probably a lot easier just to create a new PI tbh
ok i understand, but regarding creating new PI, I read that stripe encourage to have only one intent per order/transaction
There's no harm in multiple Payment Intents really
ok, i think i get it now, thank u for ur help