#nina_ece-shipping
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/1440421725908111423
đ 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.
- nina_api, 16 hours ago, 13 messages
nina_ece-shipping
It looks like you get that error if you explicitly set shipping on PaymentIntent creation server-side but then try to override it client-side and it's blocked.
So I think if you use ECE you shouldn't set shipping on creation at all on the PI and let ECE pass it during confirmation
If I want to pass the shipping address in the service side when I create PI. How can I do it when I invoke confirm in ECE?
you can't. You'd have to disable shipping collection in ECE in that case since you already have collected shipping. Does that make sense?
I don't think so. I can't remove the shipping collection in ECE. The customer need to choose their shipping address
I mean if it is possible to remove shipping when I invoke confirmPayment
elements,
clientSecret,
confirmParams: {
return_url: returnUrl,
payment_method_options: {
card: { setup_future_usage: 'off_session' },
},
payment_method_data: {
billing_details: {
name: `${state.checkoutInfo.shippingFirstName} ${state.checkoutInfo.shippingLastName}`,
email: state.checkoutInfo.email,
phone: state.checkoutInfo.phone,
},
},
},
redirect: 'if_required',
};
const result = await stripe.confirmPayment(confirmPaymentParams);```
The customer need to choose their shipping address
but then why do you have it on PaymentIntent creation in that case if you want the customer to pick one in ECE?
In my code, the previous integration of the Payment Element passed in the shipping information when creating the Payment Intent. I want to reuse that logic.
Gotcha, so you are using both PaymentElement and ExpressCheckoutElement?
I think you need to change your code, remove the shipping on creation and pass it on confirmation instead with PaymentElement with https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-shipping
that way PaymentElement passes whatever you collected and ExpressCheckoutElement passes what was collected in the UI with it
Thank you your suggestion.