#xfechx - payment method types
1 messages · Page 1 of 1 (latest)
when creating checkout sessions - and not passing any payment-method-types, I cannot see SEPA, or SOFORT options
or BECS Direct Debit
You will need to pass in the PM types you want to see: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types
but I read that if i got rid of that line, then it would be automatic
I had my implementation before with it, I removed it and now I can see SEPA and CARD, but I cannot see the other ones.
I cannot see BECS direct debit, when currency is AUD
for example
Did you see BECS direct debit before?
no, but with the same code I also use another of my accounts that accept EUR and I can see SEPA direct debit if I enable in the dashboard.
So not sure why when using the australian account with the same code, and BECS enabled on dashboard, I cannot see it on a checkout session with AUD.
Also, I am missing KLARNA option too, and have it enabled on dashboard
Can you share a checkout session id here?
sure
That is one with EUR, I can see SEPA, but not KLARNA
The following one (generated from the same site/code):
doesn't have BECS or AFTERPAY
although is enabled in the account's dashboard
Ok one moment
Also, how can I enable payment methods for connected accounts?
That's not possible for now, each individual accounts control their own payment methods enabled but that doesn't apply to Sessions you create
(I'm still looking at why AU BECS doesn't appear yet)
hmm, they told me to email an address, which I haven't gotten a reply yet.
also, if it is not auto, can a platform enable via accessing to the connected account?
or API ?
That address is correct and that's where you'd get an answer from. And no there's no API either for that. For now it's just completely disabled as a Connect platform and you can't use automatic payment methods, or you only get cards
Okay, so I created a brand new Australian account with AU BECS Debit enabled and it appears in my Checkout Session at least so it's a config issue somewhere on your account I assume, still digging
Thanks
Also while I have you, you really should consider moving to the latest API version and passing real line items with a Price id or price_data instead of the legacy version you use that we deprecated in 2018 already!
you are passing hardcoded amounts which is something we deprecated back in 2018. You're getting display_items in the response also because you use such an old approach
Instead you should be using line_items as an array of Price ids price_123 or using price_data if you dynamically create Prices: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
And okay we figured out the issue with AU BECS Debit. You are passing payment_intent_data[setup_future_usage] which unfortunately doesn't work with AU BECS Debit. It's a known limitation we want to improve on in the future, but you won't get it available for now
(have to run for a few minutes but I'll be back if you have follow up questions)
thanks, but sorry what is that parameter important for?
so to see if I can just get rid of it on my implementation
What can I replace for payment_intent_data, can I use price_data instead?
that parameter is here to save card details after the payment
it's just incompatible with AU BECS Debit
And no payment_intent_data and price_data are completely unrelated and separate 😱
payment_intent_data is controlling specific options for the first payment.
price_data is used to create one Price object inline
and what about AFTERPAY?
Why is it not appearing also on those checkout sessions?
when AUD is the currency
Same Afterpay doesn't allow recurring payments
it's a one-time payment payment method for now
but I cannot get rid of setup_future_usage
can I use something else instead of payment intent data? to pass on checkout values?
No that's impossible
Sorry, we're running a bit in circle because I wasn't super explicit.
setup_future_usage is used to save payment method details. This is not compatible with Afterpay or AU BECS Debit.
So if you want to accept card, Afterpay and AU BECS Debit, and you want to save card details, you have to create separate Checkout Sessions right now unfortunately
I don't necessarily need to save customer details though, so not sure if using this is what I need if I can omit it and then have more payment methods available..
Okay so if you don't care about saving payment method details, you just remove payment_intent_data[setup_future_usage]
ok, getting becs, but not afterpay
Do you have an example I can look at?
easiest way is to try forcing afterpay first and you'll see a clear error: shipping address collection is required for Afterpay
I see, how can I get shipping address in checkout?
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-shipping_address_collection it's all in the API Reference
thanks, is there an 'auto' for shipping address collection depending on the user location?
or do I need to add those "array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations"
you have to add the countries like we document
I see