#boris_code
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1319429740423151707
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- boris_code, 2 days ago, 4 messages
Hello! The Payment Request Button is legacy and not recommended. I encourage you to use the Express Checkout Element instead if at all possible.
Can you tell me more about the issue you're having with Express Checkout Element?
I'm not using PaymentRequestButton. I using PaymentElement and it don't seems outdated.
https://docs.stripe.com/payments/payment-element
Oh, I completely misread what you wrote, my bad!
The issue I’m struggling with is the inability to make shipping details mandatory for Apple Pay. I was able to request this successfully using the ExpressCheckoutElement, but it doesn’t integrate with the PaymentElement in the same way.
How are you collecting address info when Apple Pay or Google Pay aren't used?
I have custom form, that i use later for initiating shipping with a selected carrier
I'm checking to make sure, but I don't think we support doing this with just the Payment Element.
For mobile payments, I prioritize speed and pre-filling, so having shipping details from Apple Pay, for example, is essential for me. With ExpressCheckout, it was straightforward - just a simple setup.
const onClick = async ({ resolve }: StripeExpressCheckoutElementClickEvent) => {
resolve({
shippingAddressRequired: true,
allowedShippingCountries: ['US'],
shippingRates: [
{
id: 'default',
displayName: 'Auction Shipping',
amount: 100,
},
]
})
}
return <ExpressCheckoutElement onConfirm={ handleConfirm } onClick={ onClick }/>
Is there a way to interact with both mobile payments and card payments while also having the ability to define custom payment settings?
I don't think so, not in the way you're describing at least. Our general recommendation is to put the Express Checkout Element immediately above the Payment Element and Address Element, like this: https://4242.io/test/elements-recommended/
Actually, one thing you could do is use the Payment Element + the Address Element, like this: https://4242.io/test/payment-element-with-address-element/
When you select Apple Pay there you can't proceed until you fill out the address.
Yeah, but it's not exactly what i want. Ok. For first option is it possible to get rid of apple/google pay in Payment Element? Can i somehow pick, what do i want to show?
Not sure I understand, can you clarify?
Hm. I have options in my Payment Element: card, apple pay, etc. And i have an ExpressCheckout with ApplePay as well. How can i edit the list of payment methods available in PaymentElement then?
When you use Express Checkout Element alongside Payment Element you should only see Apple Pay, Google Pay, etc. in Express Checkout Element, not Payment Element.
Oh, so they share some kind of context?
Perhaps you're using multiple instances of Stripe Elements? You should only be using a single instance for both.