#eldhfl

1 messages · Page 1 of 1 (latest)

fiery geodeBOT
small belfry
#

hello! If you're not saving the PaymentMethod to be reused, then every time the customer makes payment, they'll need to verify their account - this is expected behaviour

tepid pawn
#

Hmmge I see, so we have to save the customer info and payment method on stripe to avoid this?

#

For context, the payment portal is a public page (which means customers don't have to login to pay).

#

If I put the customer ID when creating a payment intent, will it automatically save the payment method after successful confirmation? Or do I have to manually save the payment method?

small belfry
#

I assume by bank transfers - you're referring to the payment_method_type as us_bank_account?

small belfry
#

that's actually what we term as a bank debit. You will need to make a few modifications to your logic -

  1. when creating the PaymentIntent, you can use setup_for_future_usage=off_session to save the PaymentMethod for future use. You should also pass in the Customer id when creating the PaymentIntent. If payment confirmation is successful, it will automatically attach the PaymentMethod to the customer.
  2. when the customer navigates to your payment page, you should display a list of existing payment methods which they can make use of, you can then confirm the payment with the existing PaymentMethod id instead (if they choose an existing PaymentMethod)
tepid pawn
#

I see, but for number 2, as I've stated above, the payment portal we have is public, anyone with the link can open it. So if we display the existing payment methods, wouldn't that be a problem?

#

Like, I can just pay in their behalf coz I have access to the portal

#

I don't want to compromise that

small belfry
#

ah yeah, then there's no workaround for this

tepid pawn
#

Or should we change it, like when they login on the portal, it will show the existing payment methods.

#

But if they're not logged in, does that mean they will go thru with the verification every time they using bank?

small belfry
#

Or should we change it, like when they login on the portal, it will show the existing payment methods.

This would work

But if they're not logged in, does that mean they will go thru with the verification every time they using bank?

Yes, they will need to go through verification every time they bank. Cause you can't be certain they are a particular Customer if they don't login

tepid pawn
#

Hmm, even if I attach the customer ID to the payment intent?

#

Coz we can attach the customer ID even if they don't login

#

I just don't want to display the existing payment methods for anyone

#

Also, is it alright to screenshot this conversation? I will have to report to my superior

small belfry
#

can you explain a bit more on why you want to attach a customer ID to the PaymentIntent if you don't know who this customer is?

#

generally, the entire idea of using a Customer ID would be to be able to identify this same Customer again or to save their PaymentMethods. If they don't login to your site/portal, there's no way for you to identify who they are

tepid pawn
#

So we know who the customer is (on our end)

#

But not on Stripe

#

Coz we don't save customer info on Stripe

#

Just on our backend

#

Basically, our Stripe integration right now is only solely for payments.

#

But since, the verification for bank debit happens coz Stripe doesn't know which customer is paying, then we will have to save the customer info on Stripe too (we will implement this).

tepid pawn
#

So I'm clarifying if the verification will still happen even after I attach the customer ID (stripe) to the payment intent, and they manually fill in the bank details.

#

Not choosing from the existing payment methods saved on Stripe

small belfry
#

So I'm clarifying if the verification will still happen even after I attach the customer ID (stripe) to the payment intent, and they manually fill in the bank details.

Yes the verification will still happen. In essence, they're making payment with a new payment method

tepid pawn
#

Ahh, I see, so they will have to choose from the existing payment methods to avoid this.

#

Follow up question, is there a way to set the payment method on the payment elements? Or do I do it on the intent itself?

#

Like if I display the existing payment methods, and the customer click it, do I just update the payment intent and it will reflect on the payment elements?

small belfry
tepid pawn
#

Ohh I see ok

#

Thank you so much for you help!

#

Appreciate it