#chimanos

1 messages · Page 1 of 1 (latest)

dusty sealBOT
midnight saddle
#

Hi there!

olive creek
#

✌️

midnight saddle
#

Good question, let me check...

olive creek
#

(I tried to seek for a txr_xxx id somewhere in the objects mentionned above, without no success)

midnight saddle
#

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"]

olive creek
#

Haaaa

midnight saddle
olive creek
#

Because I had this

total_details: { amount_discount: 0, amount_shipping: 0, amount_tax: 800 },

and though it was all

midnight saddle
#

Yes it's easy to miss the expand part.

olive creek
#

[...] 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 ?)

midnight saddle
#

Can you share the Checkout Session ID (cs_xxx)?

olive creek
#

In other words; I think what you pointed to me is the orange circle, while I'm searching for the red circle :

olive creek
#

(but this has only one tax rate, bad example)

#

(iRL emergency, sorry if I reply late)

midnight saddle
#

Got it. Looking into this.

#

I think that's what you are looking for.