#dawid_fw
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- dawid_fw, 2 hours ago, 32 messages
Current state:
There is no option to make AutomaticPaymentMethods work correctly and consider country while showing payment methods.
We tried:
- BE Payment Intent with shipping Address
- BE payment Intent with billing address (cannot be set due to payment method error)
- BE payment intent with customer with billing address
- FE without intent and provided default values for shipping etc.
- Few more you recommended
Last one you suggested.
We created customer with PL as country:
stripe customers create --name="Jenny Rosen" --email="jennyrosen@example.com" -d "address[country]=PL" -d "address[city]=Poznań"
Than created intent with given customer:
stripe payment_intents create --amount="2000" --currency="usd" --customer="cus_POonzxhhcIZuDz" -d "automatic_payment_methods[enabled]=true"
Than initialized elements with such secret:
const elements = instance.elements({
// @ts-ignore this is not typed in @types/stripe-v3
clientSecret: "pi__"
})
const element = elements.create('payment', {...})
Expected: No Klarna or Cash App
Result:
Just to make sure I understand - your main issue here is that you're displaying payment method types that won't work for a customer's country, correct?
Exactly.
As far as I know, there isn't really a great way to solve for this - the only solution I could think of would be for you to implement your own filtering system that decide conditionally when to display each PM type
Is it planned to be added?
Tbh. we wanted to base on Stripe experience with payment methods for returning and ordering payment methods...
But currently it looks like usage is very limited.
Also, we don't know the exact details about the minimum amounts (deferred payment methods) or other requirements and it might fail on creating payment intent :/
For the amount - you should be able to continually update the elements object (https://stripe.com/docs/js/elements_object/update) to the correct amount so it can accurately reflect which PM types are available
For the country -based filtering - I can flag the feedback (and we've had others ask for it in the past as well), but I don't think there's any specific timeline so far
I think you're not right about amount too
I just tried
amount: 50,
paymentMethodTypes: ["card", "afterpay_clearpay"],
and instead of not showing afterpay_clearpay it returned error :/
"Amount must be no less than $1.00 usd"
Hi there 👋 jumping in as my teammate needed to step away.
What is the currency you're using there, is it still usd? We do have errors that are expected to be thrown if you start trying to drop below our minimum charge amount, but I wouldn't have expected that to be thrown for an amount of 50.
yeah it's USD it was thrown because afterpay minimum is 1.0$ I guess
It's what exactly I was worried about here: #1197623093850542152 message
Out of curiosity, do you have testing that supports that suspicion? Did the error change to saying $0.50 if you dropped afterpay_clearpay?
I just removed afterpay_clearpay and it rendered payment element correctly
If I reduce amount to 49 (0.49$) it returns error saying 0.5$ is minimum
Yeah, sounds like there are other minimums being taken into then. Taking a step back, since this is lengthy discussion that I honestly haven't been able to fully catch up on, it sounds like you're trying to build a flow that we largely don't handle well and my teammates have been helping flag those shortcomings for our teams to review. Are there any currently outstanding questions/concerns that haven't been discussed?
No, no more questions. Looks like we ended with what we didn't want to implement.
So TLDR it sounds like we need to take full responsibility for what payment methods we render. 🙂
Thanks! We hope that Payment Elements will consider countries as for now Automatic Payment Methods are not usable for multi-country with single currency solutions. (E.g. using USD in Poland)