#chimanos
1 messages · Page 1 of 1 (latest)
Hi there!
✌️
Good question, let me check...
(I tried to seek for a txr_xxx id somewhere in the objects mentionned above, without no success)
Found it! It's in: total_details.breakdown.taxes https://stripe.com/docs/api/checkout/sessions/object?lang=dotnet#checkout_session_object-total_details-breakdown-taxes
Note that to get this field you'll need to use expand.
Something like this when you retrieve a Checkout Session: expand: ["total_details.breakdown"]
Haaaa
If you are not familiar with expand, you can learn more about it here: https://stripe.com/docs/expand
Because I had this
total_details: { amount_discount: 0, amount_shipping: 0, amount_tax: 800 },
and though it was all
Yes it's easy to miss the expand part.
[...] trying
Found, great stuff
Could you just tell me how it behaves when there are multiple applicable tax rates for different products (if that's the case ?)
I mean I received this :
{
"discounts": [],
"taxes": [
{
"amount": 800,
"rate": {
"id": "txr_1NKywSA7IOS66i6wGR23pFMd",
"object": "tax_rate",
"active": false,
"country": "FR",
"created": 1687245932,
"description": null,
"display_name": "VAT",
"effective_percentage": 20,
"inclusive": true,
"jurisdiction": "France",
"livemode": false,
"metadata": {},
"percentage": 20,
"state": null,
"tax_type": "vat"
},
"taxability_reason": "standard_rated",
"taxable_amount": 4000
}
]
}
Which apparently leaves me no option to find the "link" between a line_item and that specific tax rate
(Is there maybe another expand I could run, maybe nested inside line_items to get this ?)
Can you share the Checkout Session ID (cs_xxx)?
In other words; I think what you pointed to me is the orange circle, while I'm searching for the red circle :
cs_test_a1rqP1zPVlbLpkazv2WcgEvl2WM3szvneilAErbbYcj9jYNDu5tnMza9M1
(but this has only one tax rate, bad example)
(iRL emergency, sorry if I reply late)
Got it. Looking into this.
Well you also have line_items.data.taxes that is also expandable: https://stripe.com/docs/api/checkout/sessions/object?lang=dotnet#checkout_session_object-line_items-data-taxes
I think that's what you are looking for.