#HVMP

1 messages ยท Page 1 of 1 (latest)

simple sandalBOT
desert iris
#

Good question. Checking in to this and will get back to you.

unborn verge
#

Thanks Pompey! Either way I think we'd be able to make it work, but detailed attribution of tax amounts back to what caused the tax would be ChefKiss

desert iris
unborn verge
#

We would be using neither, actually.

#

We would directly be using the payment intents API

#

So any taxes we would include the tax calc in a metadata key, and just include the tax amount in the payment intent amount.

#

"would be", we currently are using payment intents. Also love payment intents btw ๐Ÿ™‚

desert iris
#

Can you show me how you are passing this line item data in to the payment intent? I did not think that they had that functionality

unborn verge
#

It does not.

#

Basically i want to calculate tax before creating a payment intent.

#

Once I have cost of all the line items (including shipping and tax), I would then create the payment_intent amount (with all of that summed up).

#

In our internal 'order' records, we currently attribute taxes on a line-item basis since our current tax calculator provides this. Given our platform it is also beneficial to get this breakdown as well.

#

Also eyeing TaxJar, seems like a stripe company.. Perhaps better for our more "custom" usecase than stripe tax.. Still exploring.

desert iris
unborn verge
#

Yeah, this is the doc I was looking at. I think there just isn't, currently, support for line item breakdown.

#

I suspect ya'll use TaxJar under the covers since it's a stripe company, so maybe at some future point it'll be available ๐Ÿ™‚

desert iris
#

Apologies I am not as familiar with that API and am just getting to look deeper. I see our sample code on that page shows getting line item level tax info via line_items.data.tax_breakdown', is that a different kind of breakdown than you want or have you been testing and finding that those are not populated? https://stripe.com/docs/api/tax/calculations/object#tax_calculation_object-line_items-data-tax_breakdown

unborn verge
#

OH!
I didn't realize that was in the response object. Perfect. All the doc examples didn't include that, and I scanned over it because I thought it was just scoped to the request objs in the line item.

#

This looks exactly like what we would need.

#

Thanks a ton!!

desert iris
#

Awesome! Glad that API is useful here, that kind of stuff is definitely a pain to DIY