#trapov
1 messages · Page 1 of 1 (latest)
Do you have the checkout session ID?
Lemme create it again
@graceful marlin cs_test_b1zTdAd2R1Fpq5JD1CwaVavHc0zzsoMLLwdWo290lbbpQLE2YVVeGHM7K9
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-total_details-breakdown-taxes you can expand the breakdown object and see how the tax is aggregated.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It won't return it after the initial creation?
I need to manually get it?
becuase right now it returns
"total_details": {
"amount_discount": 500000,
"amount_shipping": 0,
"amount_tax": 33333
}
I don't see the breakdown
you need to expand it. see https://stripe.com/docs/api/expanding_objects#expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
oh, okay
"total_details": {
"amount_discount": 500000,
"amount_shipping": 0,
"amount_tax": 33333,
"breakdown": {
"discounts": [
{
"amount": 500000,
"discount": {
"id": "di_estimated_1NM1MTQcL35HFXVXkADgAivr",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "sbAE35Ik",
"object": "coupon",
"amount_off": 500000,
"applies_to": null,
"created": 1687493561,
"currency": "usd",
"currency_options": null,
"duration": "once",
"duration_in_months": null,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": "Discount",
"percent_off": null,
"redeem_by": null,
"times_redeemed": 0,
"valid": true
},
"customer": null,
"end": null,
"invoice": null,
"invoice_item": null,
"promotion_code": null,
"start": 1687493562,
"subscription": null
}
}
],
"taxes": [
{
"amount": 33333,
"rate": {
"id": "txr_1NM1MTQcL35HFXVXP22zGzFa",
"object": "tax_rate",
"active": true,
"country": "US",
"created": 1687493561,
"description": null,
"display_name": "Tax 10.0 % (Exclusive)",
"inclusive": false,
"jurisdiction": null,
"livemode": false,
"metadata": {},
"percentage": 10.0,
"state": null,
"tax_type": null
}
}
]
}
}
I still don't understand why is it 333.33 $
Hmm. the breakdown doesn't really explain.
Can you reach out to support? our support team will be able to assist you better than I can: https://support.stripe.com/contact\
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Ok, I think I know why the tax is 333.33