#lifeofnitz
1 messages · Page 1 of 1 (latest)
I’m creating a tax calculation which is returning the following response.
——
{
"id": "taxcalc_1O8PTjGD6SohSNE6pBOSeFKJ",
"object": "tax.calculation",
"amount_total": 108,
"currency": "usd",
"customer": null,
"customer_details": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": "78610",
"state": null
},
"address_source": "billing",
"ip_address": null,
"taxability_override": "none"
},
"expires_at": 1699198811,
"livemode": false,
"shipping_cost": null,
"tax_amount_exclusive": 8,
"tax_amount_inclusive": 0,
"tax_breakdown": [
{
"amount": 8,
"inclusive": false,
"tax_rate_details": {
"country": "US",
"percentage_decimal": "8.25",
"state": "TX",
"tax_type": "sales_tax"
},
"taxability_reason": "standard_rated",
"taxable_amount": 100
}
],
"tax_date": 1699026011
}
——
Then I go to create a Payment intent and when I try to create the tax transaction from the calculation passing the Payment Intent ID and the Tax Calc ID it returns me a response with no monetary data.
——
{
"id": "tax_1O8Ov5GD6SohSNE6RYhZQXLp",
"object": "tax.transaction",
"created": 1699023892,
"currency": "usd",
"customer": null,
"customer_details": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": "78610",
"state": null
},
"address_source": "billing",
"ip_address": null,
"taxability_override": "none"
},
"livemode": false,
"reference": "pi_3O8EGoGD6SohSNE61gSgZL5u",
"reversal": null,
"shipping_cost": null,
"tax_date": 1699023863,
"type": "transaction"
}
——
Any ideas what could be causing this?
hi 👋
it would be easier for me to read if you just provided the IDs for each object instead of the full body
I can look those up
Oh my bad!
taxcalc_1O8PTjGD6SohSNE6pBOSeFKJ
pi_3O8PPzGD6SohSNE60JDU508P
tax_1O8Ov5GD6SohSNE6RYhZQXLp
No problem, Iit's just easier to read this way
Okay so you
- Create a tax calculation that comes back with $.08 in tax https://dashboard.stripe.com/test/logs/req_KUzgnwgnA2QpWY
- Create a Payment Intent https://dashboard.stripe.com/test/logs/req_MD3YOMkqK6sbBP with a different
amountthan specified in the tax calc - Get the tax transaction without any
line_items
Did you expand the line_items property when you created the tax transaction?
Hi! I forget that I need to multiply the values by 100 when making the calls... That must be the issue.
What is the line_item expansion? I couldn't find a description of that in the docs.
If you look at the code snippet for the api doc I shared, you will see the expand parameter passed to the API. This will return the line_items parameter complete with monetary details
Gotcha! Thank you very much! I'm going to give it a try.
I just don't understand why that parameter has quotes. When I try to pass it I get an error.
Never mind sorry. It works now.
Great
Thank you so much!