node-sales-tax icon indicating copy to clipboard operation
node-sales-tax copied to clipboard

Specify origin country per-method call

Open gf3 opened this issue 4 years ago • 5 comments

Hi there,

Thanks for building this wonderfully useful library. We're planning on using this in our e-commerce platform which allows users in several different countries to sell to their customers. This means we'll need to change the origin country on a per-estimate/invoice basis. Using a global origin introduces a race condition under our circumstances, i.e. when two customers from two different user's origins request an estimate/invoice at the same time.

Are there any plans to allow the origin to be set at the time the sales tax is requested? Thanks!

gf3 avatar Jan 28 '21 15:01 gf3

Hello! Thanks for the feedback. I'm leaving this open as I 100% understand this is a recurring need for Marketplace-type businesses, whereas ours (Crisp, for which this library was initially built), is a SaaS.

I'll probably provide a way to consume the library by creating independent instances of it.

valeriansaliou avatar Jan 28 '21 17:01 valeriansaliou

That sounds like a perfect solution. Thank you!

gf3 avatar Jan 28 '21 17:01 gf3

This would be amazing.

Thanks for a very cool library, that I wish I had found earlier :)

holm avatar Mar 07 '21 11:03 holm

Hi @valeriansaliou, Is there any news regarding this issue? Thank's!

valentindoulcier avatar Apr 21 '22 12:04 valentindoulcier

I'm open to PRs on that. No bandwidth to do it myself.

valeriansaliou avatar Apr 21 '22 12:04 valeriansaliou