#redberry95
1 messages · Page 1 of 1 (latest)
Hi 👋 the Payment Element surfaces payment method types based on whether payment_method_types is defined on the Payment Intent, or based on what payment methods types are determined to be valid options by Automatic Payment Methods. The customer's default payment method should not be a factor there.
What types of payment methods are you currently seeing being offered in the Payment Element?
I have a bit of a strange setup because we are maitaining Direct Debits along with card payments, the issue is that when there's no default payment set for the customer the payment element will show only card payments (which is correct) but when we setup direct debit throught stripe checkout and then mount the payment element again it will render BACS fields only
Can you share the ID of a Payment Intent that you're using where you only see BACS offered?
we use setup_intent rather then payment_intent
Gotcha, can you share the ID of the Setup Intent then?
Ah, you're using Checkout Sessions. When you created that Checkout Session you passed bacs_debit as the only value in payment_method_types:
https://dashboard.stripe.com/test/logs/req_eMKCPwk4uuRvaK
If you also want to offer cards, then you will need to include card in that array.
its a mixture of both
we use checkout session for basc only
as we cant show basc in payment elements in our platform
and we thought we could use payment elements for showing card only inside the platform
based on the docs here & what we've tried we couldnt get payment elements to show bacs with setup intents
https://stripe.com/docs/payments/payment-methods/integration-options#support-bank-debits
so we tried to manouver around it by introducing checkout session for bacs and keep the card input in the platform
but I suppose if thats not possible it means we have to rely on card element instead of payment element then?
I'm sorry, I'm confused. The Setup Intent you referenced is from a Checkout Session, so it doesn't relate to the Payment Element at all.
You are correct that Setup Intents for BACS do not work with the Payment Element currently.
No, the setup intent id I sent over is used to mount the <Elements> component where the inside which the PaymentElement is mounted. It doesnt relate to the checkout at all
the setup intent doesnt have any specified payment methods when created as this is what the docs are saying The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"].
The request to create that Setup Intent, was a request to create a Checkout Session. I linked it above. In that response you'll see the Setup Intent ID provided is nested inside of the Checkout Session that caused it to be created.
If you're not expecting that to be the cause, then that could be where the mixup is occurring.
I don't see any separate requests to create a Setup Intent around the time of that request to create the Checkout Session.
Oh! I didnt see the link but I will have a look at it just now
It must be some mix-up we have then, because from my understanding the payment intent for checkout & the setup intent for the elements shouldnt interfere at all, right?
If you're intending to create a Setup Intent for use with the Payment Element, then you're correct, you shouldn't be using a Setup Intent generated by a Checkout Session. You should using this endpoint to create those directly:
https://stripe.com/docs/api/setup_intents/create