#afenster
1 messages · Page 1 of 1 (latest)
Hi, first to confirm a Payment you will need a frontend implementation (JS) instead of .NET
We are using Payment Element to make payments. However, we save the customer/PaymentMethod. My case here is the user selected to reuse their card ending in XXXX. This calls our .Net API which creates a PaymentIntent, adds Customer and PaymentMethod and then tries to confirm.
Ah okie that makes sense 👍
In that case it's good. And yes the return_url would be required since you chose automatic_payment_methods which is an option to let Stripe use available PaymentMethods from Dashboard. If you already know the type of the Payment Method, you can opt out of that parameter and specify card directly
Are you saying I can do a hybrid: selecting automatic payment methods for some things (like Apple Pay) but also specifying card payments directly?
And also, if I were to opt out of automatic payment methods, how do I specify what payment types I will allow?
Not sure what you mean for hybrid. You either specify automatic_payment_methods or payment_method_types when creating a PaymentIntent
payment_method_types will default to card if you don't specify anything tho
OK. So in this case, when I know that we are reusing a Card, I can just specify Card when I create the PaymentIntent? And then I can confirm with no webhook?
That is, how do I opt out of automatic payment methods?
Yes. You opt out just by not specifying the automatic_payment_methods parameter, or set it enabled = false
Aha! My function to create a PaymentIntent is setting AutomaticPaymentMethods enabled = true. So in this case, I just set it to false when creating the PaymentIntent? And then I can get a confirmation response immediately?
I think so! Let's try it in Test mode
How is that done?
OK, I tested it in my code and it worked. But I'm curious what you mean by trying it in Test mode.
I just mean in Test mode you can test anything
OK. It's working. Thank you for that.
One last question: if I was providing a return_url in my .Net code, what is that? Is that the url for my webhook?
No, that's the return_url in case you use a redirect-based URL. It's unrelated to webhook