Refund API issue: Refund_discrepancy updated after refund is success

Hi,

Our app handle refund events to calculate exact commission.

If the transaction status of the refund ID = success, we’ll start to get refund data to calculate

However, there is one order which still adds the refund_discrepancy when status = success

When we record this order, there’s only one refund_discrepancy, which leads to incorrect commission calculation

When client reports the issue, we check the order json again and it appears one more refund_discrepancy

I want to ask if you have any signal to know if refund data is locked in and has no other update. We use refund_discrepancy, shipping refunds and refund_line_item to calculate commission correcly.

Thanks!

@Liam-Shopify Hi, can you please explain and give me suggestions?