Hi, did you solve this because we are having a similar issue. The ‘hmac’ never matches doing the following with our secret key or webhook key in Remix:
export async function action({ request }) {
const hmacHeader = request.headers.get('X-Shopify-Hmac-SHA256');
const data = request.json();
const SHOPIFY_APP_SECRET = process.env.SECRET; // Get Shopify secretkey from env variable
const calculated_hmac = crypto.createHmac('sha256', SHOPIFY_APP_SECRET).update(JSON.stringify(data)).digest('base64');
// These never match
// hmacHeader == calculated_hmac;
...
}