Set up Webhook Event and add charge.refunded.
Click Add Events and after that, click Add Endpoint
Setup Payment Refund Button
In Gateway Transaction, add a Payment Refund button on the page layout
Refund Payment Functionality
If the current Gateway Transaction record Record Type is not Transaction,
If the current Gateway Transaction record Record Type = Transaction BUT has Transaction Status = Pending,
If the current Gateway Transaction record has Record Type = Transaction BUT has Transaction Status = Failed,
If the current Gateway Transaction record has Record Type = Transaction BUT has Transaction Status = Refunded,
If the current Gateway Transaction record has Record Type = Transaction AND Transaction Status != Pending/Failed/Refunded,
· The Refund Payment page will display
When Refunding a payment
If the refund is successful
A new Gateway Transaction will be created for refund and the source transaction will be its parent gateway transaction where the refund is being process/held
If the refund is failed
No Gateway Transaction where the Record Type is Refund will not be created