#sai045_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/1263821967463551027
đ 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.
- sai045_best-practices, 2 days ago, 18 messages
- sai045_best-practices, 2 days ago, 14 messages
- sai045_best-practices, 4 days ago, 9 messages
This is the status of our tax setup
I only need to test this in the test mode, how can I do that?
How/where are you trying to calculate tax? Which APIs/products are you using?
const product = await stripe.products.create({
name: 'Go-X API Access',
});
const paymentPrice = await stripe.prices.create({
product: product.id,
unit_amount: price * 100,
currency: 'USD',
});
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
mode: 'payment',
success_url: config.PAYMENT_SUCCESS_URL,
cancel_url: config.PAYMENT_FAILURE_URL,
customer: customer.id,
billing_address_collection: 'required',
shipping_address_collection: {
allowed_countries,
},
metadata: {
planId: plan.id,
ipAddress: req.ip ?? '',
credits,
},
payment_intent_data: {
metadata: {
planId: plan.id,
ipAddress: req.ip ?? '',
credits,
},
},
line_items: [
{
price: paymentPrice.id,
quantity: 1,
},
],
allow_promotion_codes: true,
invoice_creation: {
enabled: true,
invoice_data: {
metadata: {
planId: plan.id,
ipAddress: req.ip ?? '',
credits,
},
}
},
automatic_tax: {
enabled: true,
},
customer_update: {
shipping: 'auto'
}
});
THis is my code to create the stripe session
I set the address as india
We don't support automatic tax calculation in India: https://docs.stripe.com/tax/supported-countries
Okay, then what are we supposed to do for the countries that are not supported by Stripe?
You'd need to manually collect tax with tax rates or similar: https://docs.stripe.com/billing/taxes/tax-rates
So, basically this where I can use the taxRates, ahh thanks