Make a refund after the Stripe Connect transfer

Hi,
After a request is completed and order is updated completed by admin is created a transfer for Stripe.
But after this transfer is made is deleted the meta field of the charge “hp_stripe_charge_id”.
class-payout.php line 305.
If for example request is complete but we had a problem with the money and we want to make a refund, how is possible to send via API a request to Stripe to refund the charge id.
Can you explain me why Hive delete this charge id? Because this is the ID that lets me make a refund of the charge.
I have another question, for example after request is complete is made a transfer to the Vendor with the value, but if I make a refund I don’t have the transfer ID so I can make a rollback of this transfer, do you have any idea how to make a refund of the transfer?
Regards

Hi,

Unfortunately, there’s no easy way to do this because refunds are expected to be processed before orders get the Completed status. There are functions that rely on this logic, while the order is in progress, it has the Processing status, and then it’s Completed if everything is ok, or Refunded if there’s an issue with the order.

Please consider keeping this workflow by using the auto-completion period, manual completion and/or delivery so buyers will clearly indicate that they are happy with the order and the vendor can get their earnings.

There are a few helper meta values saved and deleted during the order workflow, some of these are not needed to be stored so they are deleted to prevent bloating the database tables.

Hope this helps.

Hi,
Thanks for the reply, but for clients tell explicity that everything is ok, is not a good idea, they have the service, and they don’t care about the rest, they only come tu us again if some problem appear, they will be the first to complain, we will have to maintain the flow like this, after some period of request is done, we schedule a task to complete order and the money is transfered, but if we have a complain after this period we need to have a way to refund the money, and the only way is to not delete the charge id of Stripe.
Thanks anyway :slight_smile:

Hi,

Thank you for your feedback, we will try to make the refund process more flexible in future updates.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.