Offsite payment extension does not redirect to external gateway when redirect_url returned from payment_seession

We are building a payment app being recently approved for partnership.
The extension is offsite so we need to redirect from Checkout to our Payment page.
At this point the app/extension is installed and runs fine in development mode using an ngrok tunnel.
When our payment method is selected in the Checkout Shopify sends an HTTP POST request to our payment session URL.
We do the internal validation and reply with

return {"redirect_url": buildRedirectUrl(data)}

where the buildRedirectUrl returns the URL of our external sandbox payment gateway.
Also tried

return new Response(
    JSON.stringify({ redirect_url: redirectUrl }),
    {
      status: 200,
      headers: {
        'Content-Type': 'application/json',
      },
    }
  );

Our payment gateway is in test mode set in admin.
The problem is that Shopify apparently calls our payment session URL three times in a row and not once does it redirect to the URL of our external sandbox payment gateway.
We also tried to return the

return `${request.url.slice(0, request.url.lastIndexOf("/"))}/payment_simulator/${id}

just for the sake of it as shown in the github payment app example but still not redirected anywhere.

So we are clueless about why our payment_session is called three time in a row with the same request and especially why there is no redirection after we return the redirect_url.

EDIT: in the network tab I see lots of request to https://my-shop.myshopify.com/checkouts/unstable/graphql?operationName=PollForReceipt HTTP 200 response :{ "data": { "receipt": { "id": "gid://shopify/ProcessedReceipt/2535598391632", "processingError": { "code": "GENERIC_ERROR", "messageUntranslated": "", "hasOffsitePaymentMethod": true, "__typename": "PaymentFailed" }, "__typename": "FailedReceipt" } } }