#seb_api
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/1357076039028707698
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ can you share the ID of the request that was made to create the Subscription?
I can't tell from the shared Pricing request who the Platform is and who the Connected Acount is, which makes it hard for me to tell which account settings would be used.
Thanks, taking a look.
Thanks!
Looks like a Direct Charge style flow
Not sure I follow. We create subscriptions/subscription schedules directly for our customers, but don't create charges directly
Yeah, sorry, mostly leaving that for me and my teammates. I'm indicating you're using a Direct Charges style flow for these requests, where you use the stripe-account header to make the request for the Connected Account, where the settings of the Connected Account tend to be used.
Rather than a Destination Charge style flow, where your Platform account settings would be used:
https://docs.stripe.com/connect/charges#types
Ah gotcha. Yeah, we want to inherit as many of our customers' settings as possible, so that sounds right
I'm not as familiar with the dashboard side of things, but flipping through the settings there, I'm not seeing one that automatically enables Stripe Tax for all created Subscriptions. I'm only seeing an option to make that the default behavior for Subscriptions created from the Stripe dashboard.
It does look like you have to set automatic_tax.enabled to true in your creation requests.
https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-default_settings-automatic_tax-enabled
Oh, we don't want to create these through the dashboard but through the API, in case that makes a difference?
Yup, so you'll have to specify whether Stripe Tax should be enabled in your creation requests.
The issue is that not all of our customers have Stripe Tax, or want it enabled for each subscription, so it's hard to know at the time we send the request whether to have it enabled or not
From testing in test mode, it seems like the creation request will fail if I try to enable automatic tax if the account does not have Stripe Tax
or want it enabled for each subscription
Are you letting your users pick and choose whether Stripe Tax is enabled for a given Subscription? If so, you may need to collect that selection from them before creating the Subscription.
๐ stepping in here as toby needs to step away
Okay, thanks @hollow willow for your help! And hi @undone swallow
I'd also note that you can manage Tax Registrations on Connected Accounts via our Tax Registrations API: https://docs.stripe.com/tax/registrations-api
But yes you would need to know your Connected Account wants to use Stripe Tax.
We do ask whether a user wants the generated subscription to be exclusive or inclusive of tax, but we don't currently ask them if they want to enable automatic tax. It's something we discussed internally as an option, but it's unclear what we should do here if the user says they want to use automatic tax but they don't actually have that module enabled
My understanding is that our subscription creation request would then error
The tax registrations API is helpful, though seems like it would add a lot of complexity as we'd have to know our customers' customers tax residency to determine if a tax registration for our customer is valid?
Yeah you likely need to collect the necessary info from the customer when they indicate they want Auto Tax if they don't already have it enabled?
E.g. for the request in question above, I can see that that connected account has registrations in GB, PT, and CA. So we would need to see if this customer has automatic tax enabled, and also determine if the generated subscription is within one of those countries?
Let me look at the above request, but I don't think that should be the case.
Thank you. It's req_bb1Knf43iivMRJ, the first request ID I sent was actually for the price creation, not the subscription
Yeah there is a difference between having Stripe Tax enabled on the account and having a registration for the location.
It should only error if Stripe Tax hasn't been enabled at all.
But if there is no registration then it should not error -- it just wouldn't calculate tax.
gotcha. So then I think this workflow should work:
- We check the /tax/settings endpoint to see if status: 'active'.
- If so, we ask the user if they want to use automatic_tax
- If they do, we send automatic_tax: { enabled: true } with our subscription creation request
That'll then enable automatic tax for the subscription, and Stripe will figure out the correct country registration based on the recipient's country?
Yep.
You may want to test what the registration API returns if they aren't signed up at all.
I haven't tested that.
But it might be a more programmatic way to handle this as opposed to checking via the Dashboard.
Ah sorry misread... that is what you were saying.
Okay, sweet. Yeah, I'll test that out, though it sounds like in this case we won't need to check the registration API at all since we only care about if they have the tax module enabled or not
Right you would basically use the registration API to know whether they have enabled it or not.
Oh, hang on, now I'm confused
I thought the /tax/settings API would tell me if it's enabled or not? That returns a status field
No that is the status of the registrations themselves.
You register for different locations to collect tax
Hmm okay actually it doesn't look like we error. You probably do want to ensure they have >0 registrations active
If you get an empty array you don't enable automatic tax
Ah, okay. So that'll be more accurate than checking if /tax/settings has status: 'active'?
Ah no never mind ignore me! I agree with you.
That endpoint is easier/better and all you really need.
If that shows active then you know they have Stripe Tax enabled and there shouldn't be any error on Subscription creation
Okay, awesome ๐
Hmm one sec I realize I made an assumption...
Out of curiosity, what will happen when the subscription is created then, and the customer doesn't have a registration? Will Stripe still collect the tax for the correct jurisdiction, and our customer then later sets up the registration?
I realize I made the assumption that you had already collected the Customer address here when creating these Subscriptions.
Is that going to be true?
Yeah, we do
And we populate the Stripe Customer with that address before creating the subscription
Gotcha then you should be good to go. If you want to be really sure then you could retrieve the Customer and expand tax to see what their automatic tax status is: https://docs.stripe.com/api/customers/object#customer_object-tax
Which also answers your question -- if the Connected Account doesn't have that registration then no tax will be calculated. However, if they later set up the registration then on the next Invoice tax should be calculated.
I'm 99% sure there but would recommend testing that to guarantee 100% on that ๐
(In terms of if they add the registration after the Sub was already started)
okay, thank you so much, this is super helpful!
Do you happen to know if inheriting the automatic_tax default behavior is something that's on the roadmap? Would be great if we could just fall back to the user's desired default in the future
I don't know that. You could reach out to our Support team via https://support.stripe.com/contact/login and they could correspond with our Product Eng to check as well as pass on your feedback for that desire (if it isn't already on the roadmap).
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Perfect, thanks again!