#MarcusStripe

1 messages ยท Page 1 of 1 (latest)

gloomy stratusBOT
half wedge
#

Hi there ๐Ÿ‘‹ based on what you're describing, it sounds like you're trying to process a payment for a Customer where you already have a Payment Method created. Am I reading that correctly?

drowsy swallow
#

and how would that be confirmed with 3d secure?

half wedge
#

3DS is prompted for if necessary, and that is handled by stripe.js as part of the confirmation step.

drowsy swallow
#

yeah but then the client needs the client secret, right?

#

so I'd need to provide the client secret form the backend in advance

half wedge
#

Yes, the clientSecret is necessary information in order to use stripe.js.

drowsy swallow
#

and what you describe.. only works with the payment id.. or is there another way also?

#

wouldn the payment intent client secret alone do the trick since it shoudl tell the default card also>

#

?

half wedge
#

I don't think so, but I might be mistaken. What happens if you call confirmCardPayment with just a clientSecret?

drowsy swallow
#

we are on it ๐Ÿ™‚

#

the payment id we actually dont store on our end.

#

so I would in that case have to ADDITIONALLY have to retrieve the customer

#

to get the id of the payment method

still marten
#

If you're trying to confirm for an existing customer attached payment method to support authentication, you can provide that payment method ID during confirmation

drowsy swallow
#

what?

#

didnt (fully) understand

#

so in the backend, I prepare the one time payment, with an invoice, finalize the invoice, on the finalize call I add an expand for the payment intent client secret

#

now if I need the payment method id additionally, it seems I need another call

#

for the default card of the customer

still marten
#

How does an invoice come into play here? You're creating manual invoices?

drowsy swallow
#

A manual invoice, yes

#

I was told this is the way

still marten
still marten
drowsy swallow
#

To do a one time payment

#

where the payment is payed immediately

still marten
#

You do not need to use an invoice

#

You can but you can collect one time payments using just Payment Intents directly. Invoices use payment intents internally, but are not a required pattern.

#

Maybe you have some business requirements that lead you to use invoices?

drowsy swallow
#

But if I need to give the id of the payment metod in the client call - confirmPayment - then how does the client get this id? I need to return it from the backend - and how does the backend get the payment Id? We do not store it. so either there is a possibility of another expand on the invoice creation or finanlization.. or I need to make a call for the default payment method id additionally

still marten
#

For a one-time payment, you'd typically collect the payment details during confirmation in the client (eg using Elements)

drowsy swallow
#

Maybe you have some business requirements that lead you to use invoices?
I was told to do so by your colleagues here. You are one of the most experienced stripe guys here so I trust what you are saying ๐Ÿ™‚

still marten
#

To use a previously collected card, you'd need to supply those PM ids

drowsy swallow
#

well technically... at some point... for anything paid.. of course the customer needs an invoice.. but how this is achived.. by frontend or backend or whatever.. I do not really care

still marten
#

That's why I'm wondering if you mentioned some requirements in the past that lead to the invoice suggestion

drowsy swallow
#

no

still marten
#

the customer needs an invoice
do you mean receipt?

drowsy swallow
#

they wanted me to attach the payment to the subscription that also exists

#

but I do not want that

still marten
#

An invoice is a specific legal document, and perhaps this is why you were told manual invoices

drowsy swallow
#

I want it to be bought / paid independent of the fact of a subscription.. which might even when requirtement change in the future.. not at all exist

#

well again.. we need to send an invoice at some point for the one time payment

#

in the USA, things mighht be more relaxed. but in Germany, for any money movement... we need to send an invoice to the customer

still marten
#

Ok, fair -- that's the requirement I was wondering about, you do need an invoice for regulatory reasons

#

OK, so you're using manual invoices ๐Ÿ‘

#

And you've collected and saved card details

#

but the payment failed as requiring authentication

#

So, yes, you need to get the customer on session, and yes you need the invoice payment intent client_secret

#

Then you can optionally send the payment method id to the client and use that during confirmation, if you wish to retry with the same card

#

Or, you can have the customer provide new payment details

drowsy swallow
#

well the customer is on session at this point anyway

#

but I would like to just use their default card and not force them to re-enter their card

still marten
#

OK then you can provide that automatically as i described

#

And just show the customer a "confirm payment" button or similar to trigger the flow

drowsy swallow
#

so again.. how... is there the possibility of an expand on the finanlize invoice call?

#

or do I need to make an extra call to get the customer's payment method id?

still marten
#

Do you have a specific finalize request I can look at where you're seeing this?

drowsy swallow
#

not atm

#

my colleague has tried it locally without a pm id

#

and he said it worked fine

#

now he will switch to the test system and test it with the stripe ALWAYS 3d Secure test card

drowsy swallow
#

It works. Without the payment method id

#

including with the always 3D secure needed test card.