#_liamm3
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.
We only want to ship to a few selected countries. So we would like to restrict the options a customer can select.
I'm not sure it's possible
while looking at it I was able to find it though https://stripe.com/docs/js/element/events/on_click?type=expressCheckoutElement#element_on_click-handler-resolve-allowedShippingCountries
Thanks for the quick help! I tried adjusting my expressCheckoutElement.on('click', ...) but with no success. I still see a list of all countries. Am I doing something wrong?
const expressCheckoutElement = elements.create("expressCheckout", expressCheckoutOptions);
expressCheckoutElement.mount("#{{ id }}");
expressCheckoutElement.on('click', (event) => {
const options = {
allowedShippingCountries: ['DE', 'AT', 'CH'],
emailRequired: true,
shippingAddressRequired: true,
shippingRates: [
{
id: 'free-shipping',
label: 'Standard',
displayName: "Standard",
amount: 0,
},
],
};
event.resolve(options);
});
Ah I see. Now it works :) Thanks a lot for the help!
let me know if you need any more help
Thanks, I am fine atm. I will reach out if i need more help. ๐