#nerder_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/1410407258118160454
π 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.
- nerder_unexpected, 2 days ago, 9 messages
- nerder_error, 5 days ago, 19 messages
To add additional context, we are using Stripe Connect standard and our customers are Gyms selling Membership and bundle of classes
Hi π
We actually have a doc on how we select the Customer address here: https://docs.stripe.com/tax/customer-locations#address-hierarchy
There are mutliple layers and it depends on the types of products/services being sold
ok, the tax_code makes any difference?
I don't think so. It's more focused on the way the product/service is delivered. Since the gym membership isn't something that is delivered to a customer but happens at a location, we will use the Customer's billing address details from their Payment Method
Ok, I'm a bit worried about this in our specific scenario
But if you were selling sofas (for instance), we would want to use the address the sofa is being shipped to
In our case we are actually billing a marketplace, so a user can have a billing address in a country (case they live there), but then travelling to another gym to train there for a while
normally they should not be tax exempt right?
but in this case they would probably be if I'm understanding correctly
Unfortunately I cannot speak to actual tax liability here. We can only offer advice on building Stripe integrations
Yes, what I'm trying to understand if the integration is correct or not
How are you integrating?
because we are collecting customer address but they might end up calculating the tax incorrectly for some users
If you could please explain your integration in terms of API calls and data passed to Stripe APIs that would help me understand
So in a nutshell 3 steps:
- When the admin creates a product, I'm adding the correct tax_code (https://docs.stripe.com/tax/products-prices-tax-codes-tax-behavior#product-tax-code)
- When the user attempt to buy at checkout I'm pre-calculating the tax they will pay based on the GYM location (not customer) creating a
TaxCalculation - When the user completes the purchase, for both a sub or a one-off invoice, I'm enabling
automatic_tax
basically this is the integration
const taxCalculation = await this.stripe.tax.calculations.create(
{
currency: price?.currency,
customer_details: {
address: {
country: gym.countryCode,
state: gym.countryState,
},
address_source: 'billing',
},
line_items: [
{
amount: price?.price,
reference: price?.code,
},
],
},
{
stripeAccount: gym.accountId.value,
},
);
this is the code for the tax preview, using gym location not customers
Okay. So in that case you would need to provide your tax calculation when you process the payment instead of relying on Stripe's automatic tax
ah, that's interesting!
We describe how you can achieve this here: https://docs.stripe.com/tax/custom#tax-transaction
It's basically our "Custom" flow. For those scenarios where our defaults don't match you business case
Ok, but can this be used in combo with subscriptions or invoices?
In that case you would need to apply them to each successful Payment Intent as the Customer pays the Invoice
In this case we don't have a middle ground. Since you are already creating the tax calculation, you have the data
And if you are using Susbcriptions you should already have a webhook listener
But I get it that finding the right tax calculation for each Customer when receiving a payment_intent.succeeded event might be pretty tricky to get right
Yes yes, but I wonder if the automatic_tax is not enough really
seems a pretty normal use-case to me
especially for connect
I imagine that most services works like this for physical products (ie: Uber, InstaCart, etc)
Nothing is "pretty normal" if Connect is invovled IMO π
But I recommend discussing tax liabilities with our Support staff (https://support.stripe.com/contact) to get clarity on whether or not automatic tax would work in this scenario
Exactly, probably I will chat with them to understand better
thank you so much for the pointers
Sure thing! happy to shed what π‘ I can π
hey
just to make sure of one thing, how can I reproduce this behaviour you have in the dashboard:
for some reasons my tax calculation is showing the VAT as excluded when it should be included
this is the req: req_nDybgjx3Revqhs
hello! Gimme a while to take a look
I'm a little confused, that request (req_nDybgjx3Revqhs) you shared does show VAT, where are you not seeing it?
tax_breakdown: [
{
amount: 210,
inclusive: false,
tax_rate_details: {
country: "ES",
flat_amount: null,
percentage_decimal: "21.0",
rate_type: "percentage",
state: null,
tax_type: "vat",
},
taxability_reason: "standard_rated",
taxable_amount: 1000,
},
],
yes I was expecting it to see it included tho
ah, inclusive vs exclusive tax
yes
I see that there is a tax_behavior in the line_item which default to exclusive
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so this seems to be the issue, but how should I handle it? Should I know the convention in each country and provide one or the other?
hmmm, it's interesting that it's exclusive for yours, but gimme a while to see what I can find. Cause for EUR, I would have thought that it should be inclusive : https://docs.stripe.com/tax/products-prices-tax-codes-tax-behavior#setting-a-default-tax-behavior-(recommended)
consider that this is Connect
I don't think it should matter in this case. I think this is going to take a while for me to look into, can you write in and we'll get back to you about it. I'm going to share a DM with you where you can write in
Hello @pallid sable, we have sent you a direct message, please check it at https://discord.com/channels/@me/1349549208709107785
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.