#joey_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/1332325318630838385
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Our tax settings have "automatic tax" enabled by default, but this doesn't seem to be applied to our subscriptions.
The Dashboard setting? That only applies to Dashboard created objects. You need to specifyautomatic_tax[enabled]via API each time otherwise
If we try to create or update a subscription with "automatic tax" enabled, it'll throw an error unless our shipping info is correct. Which isn't always the case in our current system.
Yes, but you can bypass that if you wish: https://docs.stripe.com/api/customers/create#create_customer-tax-validate_location
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
oh great! So if the customer shipping info is invalid, then it'll just not add tax?
Explains here what happens in scenarios where we cannot validate the address: https://docs.stripe.com/tax/customer-locations#finalizing-invoices-with-finalization-failures
then if we update the customer shipping info correctly, it'll start adding tax and we won't have to do anything extra with the subscription?
You may just need to re-enable automatic_tax if it was disabled during a failure:
If we don’t have a recognised customer location, invoices for a subscription continue to finalise automatically but without calculating taxes. This has the following effects:
The automatic_tax[enabled] parameter changes to false on the subscription and invoice.
oh okay. So I will still need to enable automatic tax after the customer shipping is updated correctly
Yep!
or would it enable the automatic tax, after I change the shipping info?
I don't believe so, but this kind of alludes to this being supported so not sure:
To review subscriptions without automatic tax calculations in your Stripe Dashboard, visit your Subscriptions page and filter the view by the Automatic tax not enabled option. To reactivate automatic tax for these subscriptions in the future, make sure you have at least one valid customer location, and activate automatic tax through the Stripe Tax Dashboard.
I'd recommend just testing that scenario
I'm just thinking.. I'd rather not have to do an extra API call to enable automatic tax, after every time I update a customer's shipping info
thanks for this suggestion, but I could imagine that my boss would rather have me figure out a way that's automated.
Then you'd just need to use the API to guarantee success
I'm not sure what you mean by that. I'm thinking in this scenario:
- A customer + subscription is created without a shipping address. "automatic tax" is enabled
- An invoice is generated, which disables "automatic tax". Correct?
- A customer updates his address. We make an API call to update the customer's shipping info
3b. We make another API call just to re-enable "automatic tax" - A customer updates his address again. We make an API call to update the customer's shipping info
4b. Even though the customer tax is currently enabled, we make another API call because we have to do this on every shipping info update
Preferably, I would like to be able cut out 3b and 4b. Is there a way that I wouldn't have to make these extra API calls, whenever a user updates their shipping info
An invoice is generated, which disables "automatic tax". Correct?
Yes, assuming you haven't settax[validate_location]: 'immediately'on the Customer
Is there a way that I wouldn't have to make these extra API calls, whenever a user updates their shipping info
This is what I said in the above paragraph – it makes it seem like the Dashboard setting handles it but I cannot confirm so I'd test it
To reactivate automatic tax for these subscriptions in the future, make sure you have at least one valid customer location, and activate automatic tax through the Stripe Tax Dashboard.
thank you for getting back to me so quickly with all of this!
So in this scenario:
- A customer + subscription is created without a shipping address. "automatic tax" is enabled
- An invoice is generated, which disables "automatic tax"
- A customer updates his address. We make an API call to update the customer's shipping info, with tax[validate_location]: 'immediately' enabled
After step 3, will the subscription's "automatic tax" be re-enabled? Or would we still have to do an API call to enable it?
I'll do a test regardless. Thank you!
Yeah again, not sure. Let me ask a colleague
got it. Thanks!
Seems like the API call to re-enable is required
BTW, there's a tool to help migrate all your subs to Stripe Tax: https://dashboard.stripe.com/tax/migrations
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I think the optimal way is for you to validate the new address immediately via: https://docs.stripe.com/api/invoices/create_preview
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
got it. I'll just do the extra API call every time that we update customer shipping info then. As for the migration tool, yeah I know about it but I think we'd prefer not to have to do this periodically.
Either way, I'm super thankful for your help today!
Then you know it won't fail validation on the next billing cycle, where you end up in a loop of re-collecting a valid address each time
thanks for the suggestion! Though I think that validating tax immediately would suffice just as well. I just wish that the payload returned when updating a customer, would provide details that can help me determine if we need to enable automatic tax for subscriptions again.
that validating tax immediately would suffice just as well
There's no way to do that other than trying to calculate an invoice
yeah, so it looks like we'll just have to do an extra API call even if the tax is currently enabled