#benflynn

1 messages ยท Page 1 of 1 (latest)

fathom gateBOT
crude peak
#

Hello, where exactly are you setting tax_automatically? I don't see that as a property in our API reference. Do you have an example of how it is used?

rough veldt
#

It's on the subscription object

#

Basically we detected if customer.getTax().getAutomaticTax() is supported and if so we set automatic_tax to enabled on the subscription.

#

Then later if they update their payment source and that is missing a zip code, customer.getTax().getAutomaticTax() would be unsupported and any charge will fail because of it (which would be awesome if you guys changed $.02 ๐Ÿ™‚ )

#

Usually if the customer reaches out we go through the dashboard and turn off the collect tax auotmatically toggle on the subscription and all is right with the world. But turns out we had a ton of customers who weren't reporting it, so I don't know if just toggling that n their subscriptions will result in us collecting the lost revenue or if I need to do something else.

crude peak
#

When you say the invoice is in a failed state, what exactly do you mean here? Are these invoices that have been marked uncollectible or something like that?

rough veldt
#

Hang on- let me find an example.

#

So for instance, we have a customer that has several months of draft incoices with the following in the event log:

#

"last_finalization_error": {
"code": "customer_tax_location_invalid",
"doc_url": "https://stripe.com/docs/error-codes/customer-tax-location-invalid",
"message": "When automatic_tax[enabled]=true, enough customer location information must be provided to accurately determine tax rates for the customer.",
"type": "invalid_request_error"
},

Learn more about error codes and how to resolve them.

#

Customer id: cus_M5My3l90NQRMR7

crude peak
#

Gotcha, thank you for the info. Checking in to that customer. Not immediately sure if we retry invoice finalization.

fathom gateBOT
rough veldt
#

I can programmatically iterate draft invoices and finalize them if not, right?

crude peak
#

Correct, you can definitely finalize them with the API

rough veldt
#

Awesome. So I already have code to determine customers in this state and toggle the; I'll just add another method to iterate any draft invoices and finalize them. Thanks @crude peak !

#

*toggle the tax collection