#ashish_api

1 messages ยท Page 1 of 1 (latest)

gray timberBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1285441987335557252

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

hearty gulch
mighty mountain
#

I'm receiving the invoice object from the invoice.paid event

#

I just want to know what the user has paid for essentially

hearty gulch
#

Do you have an example invoice ID (in_xxx) that you're looking into, so that I can take a look?

mighty mountain
#

Let me check

#

It's mainly because I'm adding a new product, however I can't seem to find a way to make sure the webhook only listens to 1 product so I have to now place a check to see which products my webhooks are receiving

mighty mountain
#

It's related to the invoice.paid

hearty gulch
#

invoice.paid event ID will work!

mighty mountain
#

evt_1PzrP8AaUAsw03BSNMEUMai3

hearty gulch
#

In evt_1PzrP8AaUAsw03BSNMEUMai3, item.data.price shows the price ID of the invoice item. You can then map the ID in your database that associates to the product in your system

mighty mountain
#

Oh thank you!

hearty gulch
#

No problem! Happy to help ๐Ÿ˜„

mighty mountain
#

I would like to also get the product from lines.data.price.product, is it automatically expanded if sent via a webhook?

#

price works but product would be easier for me

hearty gulch
#

Yes, lines.data.price.product should be available in the invoice.paid event

mighty mountain
#

alright that's all i need. Thank you so much!