0

I'm using the Recurly v3 JavaScript API to fetch pricing info for a subscription plan: https://docs.recurly.com/js/

Specifically, I'm using the Pricing API .attach (https://docs.recurly.com/js/#pricing) to resolve the price and tax information.

Here's the problem: using the Recurly test gateway, I get estimated taxes of 0.00 for a plan using the Recurly v3 JS API. However, when I actually purchase the plan, and then if I check in the Recurly management portal, I can see my 'estimated taxes' as 17 cents. So, seeing the taxes in the Recurly management website confirms that I've configured things correctly... in other words my plan has 'collect taxes' checked, and the billing address that I'm testing with matches a state that I have configured my Recurly account to collect taxes for.

Regardless of all that, the Recurly JS API does not report the correct taxes (0.00 instead of 0.17)!

Any suggestions or insights?

Nidhish Krishnan
  • 20,593
  • 6
  • 63
  • 76
sethcall
  • 2,837
  • 1
  • 19
  • 22

2 Answers2

1

It may be that you haven't got the digital value in your form. It's a hidden field that is populated by the system to tell rjs that this is a taxable item and to use the configuration to calculate the taxes in the pricing.api

https://github.com/recurly/recurly-js-examples/blob/master/public/advanced-tax/index.html#L59

Rachel Quick
  • 1,804
  • 9
  • 8
  • Thanks for suggesting this; I don't think this is what I'm after. I could be wrong, and I tried to read up more on this tax_code field ,but... ultimately, Recurly does tax correctly; it just won't display the correct tax through the JS API. So, the system has the info it needs. It just doesn't show anything but $0.00. – sethcall Mar 24 '15 at 03:00
0

Recurly support says that this is because my application is in sandbox mode.

From their docs:

"When your site is in sandbox mode, the rates used for taxes is an estimate and is based off a semi-static internal tax table that’s updated periodically. When your site is enabled for production mode, the final rates used for purchases and recorded in your invoices are provided directly from our sales tax partner, Avalara, whose tax engine feeds the rates real-time on each request. Also while in production mode, any tax previews will use the internal tax table but will use the real-time rates when a preview goes to final billing."

This does not really add up to me. Getting 0.00 is not an estimate, but that's what support says, so I'll accept it.

sethcall
  • 2,837
  • 1
  • 19
  • 22