Why can't I fetch the charge ID while building my app?

Hi guys,

I am building Shopify app. I used custom route in return URL of recurring charge object & When the user approves charge, it is giving below error.

Session was not valid. Redirecting to /api/auth?shop=shop_name | {shop: shop_name}
2023-06-04 11:30:47 │ backend │ [shopify-api/ERROR] Missing Authorization header, was the request made with authenticatedFetch? |

However if i am giving only cloudfare URL then it is working.

I want to fetch charge ID. Any help would be really appreciated.

Thanks in advance :slightly_smiling_face: