#nollix_refund-webhook-events

1 messages ยท Page 1 of 1 (latest)

arctic nightBOT
#

๐Ÿ‘‹ 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/1448708664432263318

๐Ÿ“ 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.

arctic nightBOT
graceful moth
#

Hi there ๐Ÿ‘‹ my understanding is that refund.created is emitted when a Refund is created, rather than refund.updated. Does that align with what you're seeing when you test refunding a payment?

I'm pretty sure charge.refunded is emitted at the same time as refund.created.

south crypt
#

nollix_refund-events

#

charge.refunded is more historical. We shipped refund.created only last year and all refund.* are the right Events to listen for.
refund.updated can be sent if something changes on the Refund such as we get a reference number from the banking partner

modest grove
#

So you suggest to not listen to charge.refunded but to all the refund.*, right? Is the refund.updated sent if the status of the payment changes? (ex: from pending to succeded or from succeeded to fail)

south crypt
#

yes

#

and yes refund.updated is sent when status changes, or when something on the Refund changes like you updating the metadata, or us talking to the bank and they give us a reference number, etc.

arctic nightBOT
modest grove
#

Is it a best practice to store the data about who asked for the refund in the metadata or usually the developers store this type of data in the database?

rigid birch
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleauge needs to go soon.

arctic nightBOT
#

nollix_refund-webhook-events

modest grove
#

How can I differentiate a refund generated from the dashboard from a refund made from an API? I

arctic nightBOT
empty glade
#

hello! taking over for my colleague, give me just a bit to catch up

#

i'm 90% sure there isn't a way to determine this out of the box, but one easy solution would be to include metadata on all refunds generated via the API

modest grove
#

Yes! I can do that but the owner of the shop that is gonna use it, he will have the possibility to do refunds also from the dashboard

empty glade
#

refunds from the dashboard will be missing metadata, and if you ensure all API requests include it you can just use its presence to signal that it's API generated and its absenced as signal that it's dashboard generated