#lino-dickeys_best-practices
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/1328681816097292330
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
ECE defaults to a deferred intent flow where you initialise the Element without an intent, and then create it when the user clicks 'pay'. The rest of the flow remains the same (fulfilment with webhooks etc)
Also, API version is irrelevant I think. Not sure what you'd need to upgrade that for - what you want to do should be backwards compatible with your current version
The problem is we need the payment method id which is being provided by Payment Request Button to create/confirm the payment intent on the server, but using Express Checkout Element, it's intended to for the server to create the intent, and the frontend to finish/confirm the payment.
Basically we're only migrating to add amazon pay, and by the documentation the Payment Request Button - "Collect payment and address information from customers who use Apple Pay, Google Pay, or Link." doesn't explicitly say it supports amazon pay?
It does not. Amazon Pay is only supported on ECE
The problem is we need the payment method id
Why do you need that?
We create and confirm the payment intent immediately on the server, and the payment method id is being passed as the payment_method: paymentMethodId property when making the API call with the confirm: true
Then you can do the same with ECE if you want: paymentMethodCreation: 'manual' (https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#additional-options)
And call createPaymentMethod as normal
Although they've generally been superseded by ConfirmationTokens: https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#create-ct