#idhruv - delete payment method

1 messages ยท Page 1 of 1 (latest)

spring birch
wooden ingot
#

okay let me check the dashboard option

#

hi pompey

#

how come these payments are incomplete even though i selected "pass" when prompted in a popup after using 3ds test cards?

spring birch
#

Can you copy and paste the ID of one of those payments (pi_3LZa...) here so I can look closer?

wooden ingot
#

pi_3LZaHoGdNldKu1zm12VN6WHE

#

pi_3LZaFdGdNldKu1zm1pfzvkn4

#

another question related to card deletion, i cannot find an option to detach card from dashboard?

spring birch
#

I actually don't see the successful 3DS call here. Can you go through the client side part of this again for one of them?

wooden ingot
#

on client side it successfully showed the popup when i first tried the test card

#

and there were two options on the popup "Fail" and "Pass"

#

i pressed pass and it went ahead

spring birch
#

Interesting. I am not sure how that might have failed. And this happens for all of your payment intents that you are testing like this?

wooden ingot
#

just tested one but this card i am not able to delete

#

don't know why its not simple to delete the used card from gui

#

because of that the second time it doesn't even trigger a popup

#

i must remove it from the saved card list

#

and try again

molten herald
#

Hello ๐Ÿ‘‹
Taking over and catching up, give me a few and I'll respond as soon as I can.
thanks

wooden ingot
#

sure hanzo, plz ignore card deletion procedure

#

i have managed to make it work

#

but i have a bigger problem here:

whenever someone pays an amount on our UI, we create our payments on backend using this method:

paymentIntent = await stripe.paymentIntents.create( { amount: //some-amount, currency: 'eur', payment_method_types: ['card'], payment_method: payload.cardId, customer: userData.stripeCustomerId.toString(), application_fee_amount: fee, transfer_data: { destination: stripeAccountId } }, { idempotencyKey: uuidv4() });

now this procedure sometimes invokes 3ds-payments and sometimes it doesn't, based on my previous conversation here I was asked to use handleCardAction method, but how to mix this UI approach with my existing backend code where we are creating the payments everytime user pays using 3ds card

#

3ds card documentation is really incomplete and it needs some updates asap... i cannot even locate basic things

molten herald
wooden ingot
#

okay but what about the above scenario?

#

we create paymentIntent using stripe.paymentIntents.create but afterwards should we directly point to stripe.confirmCardPayment()

molten herald
#

Yeah I believe so.

wooden ingot
#

nope it is wrong

molten herald
#

nope it is wrong
Can you provide more details?

wooden ingot
#

this also generates paymentIntent

#

and we use stripe.paymentIntents.create which also generates payment intent

molten herald
#

calling confirm doesn't generate a new PaymentIntent

wooden ingot
#

now my confusion is that i am not able to think of what steps to take to fulfil this 3ds thing, it is so confusing and even documents are not helping me here

#

none of the documents are showing stepwise procedure, it is all spread out in different places

wooden ingot
#

can you tell me difference between stripe.paymentIntents.create and stripe.confirm, both are giving me paymentIntent

molten herald
#

if you're using the confirmCardPayment method then you don't need to use that method.

wooden ingot
#

that has status attached which says required action

molten herald
#

confirmCardPayment confirms the PaymentIntent client-side

#

The code in the screenshot, confirms the PaymentIntent server-side

#

these are two different flows

wooden ingot
#

okay, so we then need to remove our code which is:

paymentIntent = await stripe.paymentIntents.create( { amount: //some-amount, currency: 'eur', payment_method_types: ['card'], payment_method: payload.cardId, customer: userData.stripeCustomerId.toString(), application_fee_amount: fee, transfer_data: { destination: stripeAccountId } }, { idempotencyKey: uuidv4() });

and it is on server side

#

is that correct?

molten herald
#

Why would you remove the code that creates the PaymentIntent?

wooden ingot
#

because as per this screenshot it shows stripe.confirm code that creates the same paymentIntent and it takes one extra attribute of return_url

#

on server side

molten herald
#

I'm telling you it doesn't create a new PaymentIntent ๐Ÿ™‚
It tries to confirm an existing PaymentIntent

wooden ingot
#

okkay

#

so we can call this after payment intent is created. correct?

molten herald
#

yes confirmation will need to happen after creation, either use confirmCardPayment client-side or using the code in the screenshot on server-side

wooden ingot
#

okay now i am able to get this

#

so now coming to status, now if action_Required is returned by status in paymentIntent

#

Will the UI automatically open that popup? or i need to again do something on UI side

#

right now i see this popup while creating

#

payment intent and there is no code that handles this on UI, it just pops up like magic wand

#

so basically to summarize my question further

what to do after we get status as required_action on server side to get a fancy popup like above on UI?

wooden ingot
#

yes i read that but i am wondering about this line on iframe iframe.src = paymentIntent.next_action.redirect_to_url.url; just wondering will my paymentIntent created on server side will be able to show me the value for this url

#

so that i can send it to frontend

molten herald
#

just wondering will my paymentIntent created on server side will be able to show me the value for this url
so that i can send it to frontend
if its in requires_action state then it should