How to update URL signature expiry for order refunds in Online Store?

Hello there.

Background: We have an app that imports orders from Shopify and allow users to perform refunds towards Shopify without logging in to Shopify.

Issue: We want to test the Refund functionality, and unfortunately creating refundable orders via Rest API is not working properly. Therefore we thought we could create orders in Online Store. You can access it from your Shopify Store account.

The URL we are redirected to includes encoded data that allows users to see Online Store, even if a user is not logged in, but only for a limited period of time. URL signature has a exp date. What is the right way of decoding and encoding that signature? (Sample URL: Test store)
To avoid logging in to Shopify, we want to create orders in that Online Store, thus we need to update the expiry date every time we need to do that.

P.S. If there is any other way to create refundable orders with Bogus Gateway, please let me know.