#MarkoBoras
1 messages · Page 1 of 1 (latest)
This is my current configuration
const discountOptions = promotionCodeId
? {
discounts: [{ promotion_code: promotionCodeId }],
}
: {
allow_promotion_codes: true,
};
try {
const session = await stripe.checkout.sessions.create({
line_items: [
{
price: priceId,
quantity: quantity || 1,
},
],
mode: 'payment',
success_url: successUrl,
cancel_url: cancelUrl,
automatic_tax: { enabled: true },
customer_email: email,
tax_id_collection: {
enabled: true,
},
locale: 'auto',
customer_creation: 'always',
...discountOptions,
});
Hi
Can I pass user's selected city and country and that country is auto selected on checkout.
No you can't pass these information to Checkout Session. For instance, country is detected from IP of the customer automatically
sorry for late answer
do I need to slat IP address of customer on stripe checkout?
can I pass city and country from my app
reclarification of my question
I have this case:
- I am selling some products through Stripe Checkout. Tax for all users regardless of their location is my country's tax rate.
- Do I need to send IP address of customer on stripe checkout by default or can I somehow turn that off?
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
- You can't pass the country from your app unfortunately. However, you can update the Customer object and pass it to the Checkout Session.
- The IP is detected automatically.
These are one time-payments where anonymous users can access checkout so I don't have much value from customer ID.
So IP address is always sent from user's device to Stripe to detect country? I can't turn that off?