#CheckMate

1 messages · Page 1 of 1 (latest)

proven hareBOT
formal quarry
#

You should be getting the payment ID in the event body right?

vagrant haven
#

Yes but I would not know to which id I should associate it with in my Database.

#

Also if the webhook says that the payment is succeeded I would like to trigger a refund

formal quarry
#

If it's not in your database then you'll know that it's one that initially failed and you would add custom logic to handle it correctly - you'd add it in to your database at that point

vagrant haven
#

Yeah but what if something was wrong in my system, lets say the payment was succeeded and the product was shipped. But later the webhook came and it is not in my system then i would be triggering a refund which i do not want to happen.

#

Can I send some Id in metadata and query my DB using that , then I will be sure that I can auto refund

formal quarry
#

You can set whatever you want in metadata, so that'll definitely work if you want to go in that direction