#eldhfl
1 messages · Page 1 of 1 (latest)
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
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?
I assume by bank transfers - you're referring to the payment_method_type as us_bank_account?
Yes
that's actually what we term as a bank debit. You will need to make a few modifications to your logic -
- 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.
- 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)
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
ah yeah, then there's no workaround for this
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?
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
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
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
Ahh, sorry, so basically our app will generate a payment link (which leads to the portal) for every invoice (on our app).
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).
But this is the one that I don't want to happen where anyone with access to the url can pay in behalf of the customer.
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
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
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?
the Payment Element is meant to only collect new payment method details and not display existing PaymentMethods. If you display the existing PaymentMethods, and a customer selects an existing PaymentMethod to make payment with, you'll pass in that PaymentMethod id into https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method
