#grace_paymentintent-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/1287826858884206663
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ @olive lodge you seem to be calling the Create PaymentIntent API server-side here and you didn't pass any shipping address which is why you are having that error
Your integration doesn't look like a common one. It's really rare for a developer to pass so many complex options on PaymentIntent creation. What exact canonical guide are you currently following?
grace_paymentintent-shipping
@olive lodge do you have more details?
this is the code which creates payment element form
const options = {
mode: 'payment',
currency: crs_currency_code,
amount: selected_plan_price * 100,
paymentMethodCreation: 'manual',
paymentMethodTypes: ['link', 'card', 'afterpay_clearpay', 'klarna'],
shipping_address_collection : {
// Specify which shipping countries Checkout should provide as options for shipping locations
allowed_countries : ['AU', 'GB', 'NZ', 'US', 'CA'],
}
};
elements = stripe.stripe.elements( options );
const paymentElement = elements.create("payment", paymentElementOptions);
addressElement = elements.create('address', addressElementOptions);
paymentElement.mount("#payment-element");
addressElement.mount('#address-element');
following is the charge array which will be passed to create payment intent
You control all of this, you need to extract the shipping address and then pass it server-side (because of the way you chose to make your integration)