#saber-checkout-tax
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Give me a moment to take a look
ok
Using Tax Rates is different than using Stripe Tax (automatic_tax: true)
So no, you wouldn't need to set automatic_tax property while using tax rates
Good to know.
'dynamic_tax_rates' => [
'{{FIRST_TAX_RATE_ID}}',
'{{SECOND_TAX_RATE_ID}}',
// additional tax rates
],
]],
Above displays the input parameters of dynamic_tax_rate. Looks like I have to create tax rate id before before I can use dynmic tax rate feature.
Above code is in php
Correct. We have docs on that here
https://stripe.com/docs/billing/taxes/collect-taxes?tax-calculation=tax-rates
I am testing dynamic tax rate using postman, will php code structure works with postman, as I am getting error though I am passing tax id to dynamic tax rate
Not sure about the code structure in POSTMAN. The fields should be nested accordingly in order for the API to handle it correctly
What error are you seeing?
"error": {
"message": "You may only specify one of these parameters: price, price_data.",
"param": "line_items[0][price]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_Js6rJ6mYA0umht?t=1689605585",
"type": "invalid_request_error"
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I input for price and still getting above error
You seem to be passing price and price_data in the same API request. You can only pass one at a time
Let me check
unit_amount_decimal: "12000",
currency: "usd",
product_data: {
name: "Stethoscope",
},
},
quantity: "1",
price: "10000"```
I got the successful response. Now I need to know where are the tax information of checkout session response. I do not see any tax information on checkout session response.
Can you share the checkout session obejct ID?
"cs_test_b1qKMHXCwR4pwxXogRInxomB08q5dIRYs7xRrf7eYRRhBDAGKpBSEm0EPn",
The checkout session hasn't been completed yet
Adding the address calculates the tax based on the tax rate
I paid using url.Will you keep my Discord session on as I have to drive for next hour and a half and I do not miss your feedback.
Will I get back collected tax information form checkout session id or payment intent id or some other id?
So the tax information would be contained in the total_details hash
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-total_details
amount_tax should be included by default, but breakdown needs to be expanded
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-total_details-amount_tax
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-total_details-breakdown-taxes
if you look at the webhook event
https://dashboard.stripe.com/test/events/evt_1NUtHvCjwmDvqQqq4LWmBaGD
It contains amount_tax
Let me check
py_3NUtHsCjwmDvqQqq1XNKabgX. What is the name of this object?
Will successful Checkout session automatically create payment object?
It will automatically create a Payment Intent and Charge. What is the context for your question?
I am looking at the "Payment" tab of Stripe dashboard. And I am wondering, the data populated in the payment tab is fetched from how many objects?
That I can't tell you as we are not experts on the Dashboard
But transactions like CHeckout sessions completing as well as transfers will result in payments
Is is possible to look the webhook events from dashboard?
In the Developer section
I got it.
I can create tax rate objects using postman and i wanted to see these object ids at the Dashboard. Is it possible?
You should be able to see it in the API respone.
But you can view that in your account logs
Let me check it out
I can see the tax_rate object details from Dashboard. I need to save details information of the object to db table. How can I do it?
That makes sense. Thank you!
Happy to help ๐
Will you please explain what is the advantage of using dynamic tax rate feature during checkout session?
@fiery tiger what do you call "dynamic tax rate"? What's your real question?
saber-checkout-tax
If I need to collect tax from non-EU, Japan and Australi and US, then I cannot use dynamic tax rate? Right?
Instead using dynamic tax rate, I can use fixed tax rate. RIght?
I know the name of the customer billing country; I can pass predefined tax id and attach to the checkout session. All I have to do is to create more than 260 tax rates of 260 countries/regions.
I'm sorry I barely understand what you describe and the words you are using
If you don't want to use Stripe Tax, then yes Mhttps://stripe.com/docs/payments/checkout/taxes?tax-calculation=tax-rates> is the detailed doc
So yeah if you know the address upfront you pick the right TaxRate(s)
Both dynamic and fix tax rates, I need to create tax id. So what is the advantage of using dynamic tax feature?
The "dynamic" part just means you can pass multiple TaxRate and then we choose the right one
Is there a specific id in the tax_object that Sripe will use?
the TaxRate id yes txr_123
So Stripe has to go through all the tax objects and decide which one is relevant.
yes
In one checkout session, is it possible to use more than one tax_id?
Yes, that's the point of that feature. I recommend just testing this carefully in Test mode. It will be a lot easier to grasp than those long Discord threads!
So in one checkout session, I can ship Mutiple items to multiple courtiers. So I need to add multiple tax_id.
This is not really something Checkout supports at all. We don't have "multiple shipping addresses" or anything like this