Regarding testing error by developer program team on my project 402-fhe

Hello, can you please forward this to appropriate person, I have already mailed this to Jan.
My name is Aditya and my project name is 402-fhe.
I am writing this mail to bring this issue to your attention, during testing, apiId 7 was registered on the middleware by your side with the following config:
“7”: {
“path”: “/api/test”,
“endpoint”: “h.ttps://402-fhe.vercel.app/merchant”
}
This is causing payment failed: 502 errors for anyone hitting /api/test.
What went wrong is that the endpoint registered is a Next.js page (/merchant), not a JSON API. When the middleware proxies a call to it, it gets back an HTML response, not JSON and the proxy fails with a 502. Every paid API call to that path fails after the buyer has already signed the payment proof.
What a valid endpoint looks like:
The endpoint field must be a URL that returns a JSON response. All other registered APIs point to actual REST APIs (CoinGecko, wttr.in, etc.). A frontend page URL is not valid here.
Fix:
Please try testing with a valid REST api which returns a JSON response.
Let me know if you need help cleaning it up.

Thanks, please inform this as it is very important.

1 Like

Hi Aditya,

Thanks for the clear write-up. I’ve created a new endpoint pointing to a Bitcoin price (USD) JSON API, and it returns a valid and correct value now. Thank you.

1 Like