#mink4501_webhooks

1 messages ¡ Page 1 of 1 (latest)

queen sealBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1257640735361077278

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

desert eagle
#

expand:["total_details.breakdown.taxes", "line_items"] when retrieving the CheckoutSession object

dense oyster
#

Q3. How do I use the Stripe Console -> Product catalog -> Tax Rates feature? How can I pass the tax identifier generated by Tax Rate when using Checkout Session API?

=> The tax rate feature looks like it's free, right?

#

Q4. https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-total_details
The Session object | Stripe API Reference
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
expand:["total_details.breakdown.taxes", "line_items"] when retrieving the CheckoutSession object

=> What fields should I check if it's an invoice.paid event?

desert eagle
dense oyster
#
https://docs.stripe.com/api/invoices/object#invoice_object-total_tax_amounts I think!

=> No..

desert eagle
#

care to elaborate?

dense oyster
#

I want to know the amount for each tax item when the taxes come out to $10.

For example, if $10 was incurred in taxes. If VAT is $3 and I have a tax item called AAA, I want to know the itemization for the tax amount, like AAA $7 and so on.

desert eagle
#

what is a "tax item"?

dense oyster
#

Let's say you bought an XBOX from Amazon.

The XBOX costs $100 and is subject to 10% VAT and a 5% tax called AAA.

The amount you pay is
Product price: $100
VAT: $10
AAA: $5

Total price paid: $115
Total tax price: $15

So, what I want to know is how much tax was charged for each tax item when I received the checkout.session.completed webhook event and the invoice.paid webhook event.

For example.

"tax_amounts" : [
{
    "VAT" : $10
},
{
    "AAA" : $5
}
]
desert eagle
#

ack, well that is what the breakdown in total_details.breakdown is.

dense oyster
#

Q5. How can I get the information I want when I receive an invoice.paid event?

Q6. How can I get the information I want when I receive the checkout.session.completed event?

desert eagle
#

as a starting point, try setting up your scenario in test mode using Checkout, using Stripe Tax or manual TaxRates, and then retrieve the CheckoutSession with the expand I mentioned, after the payment, and have a look into that to see if it matches what you need, so we can get on the same page

#

q6 I already answered. And Q5 I think is total_tax_amounts but maybe I'm wrong. In any case, before asking more questions let's confirm that the Checkout use case works for you so please test that first and confirm.

dense oyster
#

i already tested

#

see this event

  • evt_1PY207H7t32LLKQxbmcFbrAX
#

I cant not found solution about my question.

desert eagle
#

the event doesn't have all the information, you need to call the Retrieve CheckoutSession API.

#

see my first reply in the thread about using expand to get "includable" properties such as line_items and total_details.breakdown which are not included in the default rendered version of the object sent in the webhook.

dense oyster
#

invoice.paid does not have checkout session id.

desert eagle
#

I know that. We are ignoring invoices for now to confirm that you can get what you're looking for in Checkout, as a starting point.

queen sealBOT
dense oyster
#

ok wait a minute please

desert eagle
#

for instance I did a test and can see that the breakdown explains to me that there was a 23% VAT for Ireland applied to my payment of 200eur; if there were multiple taxes applied to this purchase they'd be other items in this list.

dense oyster
#

I found that

#

but,

#

Is sales_tax referring to VAT?

Is there a clear code in capital letters?

desert eagle
dense oyster
#

Oh very good!

#

I see

desert eagle
#

I also checked the field on Invoices that I mentioned and you said "no" to, I think it has the same information just formatted differently.

#

so hopefully that helps you. I have to run but my colleague in the thread can help with any follow ups!

dense oyster
#

wait a minutes please, i will check that

#

How did you expand total_tax_amounts.tax_rate ?

desert eagle
#

maybe it's a limitation of that Stripe Shell, I don't use it

dense oyster
#

Oh i god it

#

thank you so much!