#luc_charge-tax
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/1276575159997956147
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You would need to get the tax amount and subtract it from the charge amount here. There's no "net" attribute or anything that I know of on the Stripe side that would show the amount without tax as far as I know
that's fine, do you know from what object I can get the tax amount?
What are you using to accept payments? Payment Element? Checkout? etc.
To be honest, that's on our client.. I just read their charges and I have access to their customer ID
Are you a web dev?
yes
Do you know if the Charge is part of an Invoice? Or is it just a Payment Intent?
if it is, we don't use it. so I think the safest way is facing it as a Payment Intent only
is there a way of pulling the tax using the chargeId or payment intent?
Checking with a colleague. It would be helpful if you can find out if your company uses Invoices, because if so, then this is easy.
Basically, if you use Checkout, you can look at the Checkout Session object to get that info: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-amount_subtotal
Then for the Invoice there's this field: https://docs.stripe.com/api/invoices/object#invoice_object-subtotal_excluding_tax
but I have many clients that would run the same workflow, so preferably we would do another way..
about the checkout session, what I'm looking for in the checkout session object?
There isn't another way really, without using the Tax Calculations, which is wayyyyy more complicated
hmm okay
that helps a bit already
thank you!!
I think the easiest way would be using the invoice
Yup! I would check in with your client at this point to get that info, because it's going to save you a lot of time