https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hello Retell AI Support Team, I hope you’re doing ...
# ❓・ai-evy-support
d
@AI Evy Hello Retell AI Support Team, I hope you’re doing well. We are currently facing an issue while sending a request to Authorize.net through the Retell AI platform. From Retell AI, we are generating the exact same payload as expected by Authorize.net. However, when the request is sent through the Retell AI platform, we receive a “Bad Request” error response. To verify, we tested the same payload directly using Postman, and it works perfectly without any issues. This suggests that the payload structure is valid, but the request might be getting blocked or altered when transmitted from Retell AI’s side. Could you please help us identify what might be causing this bad request error on the Retell AI platform? We would appreciate it from your end to help troubleshoot this issue further.
a
Thanks for tagging me @deep_98351. I'll look through relevant sources and get back to you shortly.
### Answer There is evidence that Retell AI does not send the payload as a raw POST body when making requests to external APIs. Instead, Retell AI adds additional context and metadata (such as tool_call_id, name, call metadata, transcript, timestamps, etc.) to the request body. This can cause issues with APIs like Authorize.net, which may expect only the raw payload and will reject requests containing extra fields, resulting in a “Bad Request” error [(1) ]() . A recommended approach is to have Retell AI send the request to your own backend server first. Your backend can then extract the necessary payload from Retell AI’s request and forward only the expected content to Authorize.net. This way, you ensure Authorize.net receives the payload in the exact structure it requires . For further details, review: [Retell is NOT sending the payload as the raw POST body]()
​ To learn more, see the sources I considered: [[1] Retell is NOT sending the payload as the raw POST body](https://discord.com/channels/1186424376300679209/1397379673436196927) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@User But same payload i seen properly generated works well on postman, I tried log out my own backend payload absolutely fine. authorize.net block the request form your side so please guide me
a
Appreciate the feedback! Feel free to ask me again with additional guidance or context.
d
@AI Evy please guide me
a
Thanks for the follow-up, @deep_98351. I'll get back to you soon.
### Answer Retell AI custom function requests always include additional fields in the request body, such as the function name, call context, and arguments, when they send data to your endpoint [(1) ]() [(2) ]() . This means the request Retell AI sends is not identical to what you might send directly from Postman—Retell AI wraps your intended payload inside a larger JSON structure. APIs like Authorize.net that expect a very specific payload structure will reject these extra fields, which causes the “Bad Request” error. The documented solution is to have Retell AI send the request to your own backend server first. Your backend should extract just the payload required by Authorize.net from Retell AI’s request and then forward only that payload to Authorize.net. This ensures Authorize.net receives the exact format it expects . Key points: - Retell AI adds metadata and context fields to the request body for custom functions. - Direct API targets (like Authorize.net) that require a specific payload will reject these extra fields. - Use your own backend as an intermediary to clean up the payload before forwarding. You can review the full custom function request/response structure here: [Custom Function]() , [Integrate any system with custom function]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
d
@AI Evy I already review this Retell AI custom function requests not inlclude any additional fields in the request body. still gives bad request. can you please guide me.
a
Thanks for the follow-up, @deep_98351. I'll get back to you soon.
### Answer Based on the official documentation, when you configure a custom function in Retell AI, you can select the HTTP method (GET, POST, PATCH, PUT, DELETE) and define the payload structure using JSON schema or JSON form, especially for POST, PATCH, and PUT requests [(1) ]() . However, there are known issues where the actual request sent by Retell AI may not exactly match what you expect, such as always sending a GET instead of a POST due to misconfiguration (like a trailing slash in the endpoint URL) , or the LLM formatting the body in unexpected ways [(2) ]() [(3) ]() . If you are certain that your payload is correct, but still receiving a “Bad Request” from Authorize.net, here are steps to troubleshoot: 1. Double-check your endpoint URL for any unwanted trailing slashes, as this can cause Retell AI to send a GET instead of a POST [(2) ]() . 2. Ensure you are defining the parameters for your custom function using the correct JSON schema format as documented [(1) ]() . 3. Be aware that Retell AI does not allow you to hard-code the exact raw body—payloads are built by the LLM, which can sometimes introduce formatting drift [(3) ]() . 4. The recommended workaround is to send the request to your own backend first, extract the required payload, and then forward it to Authorize.net. This helps ensure the payload is exactly as expected by the API . If you have confirmed all of the above and the issue persists, consider using a test endpoint (like webhook.site) to insp
ect what Retell AI is actually sending, as this can help identify subtle differences in the payload .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Custom Tool Function Call sends a "GET" from Retell to my URL and not a "POST" . Empty request body.](https://discord.com/channels/1186424376300679209/1284824056801132678) [[3] Can't make POST request with custom function](https://discord.com/channels/1186424376300679209/1410188293861146705) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
I already reviewed all thing carefully the issue form from retell ai server side because authorize.net block the request so please guide me. @AI Evy
a
Thanks for the follow-up, @deep_98351. I'll get back to you soon.
### Answer According to the official documentation, when you configure a custom function in Retell AI, the platform sends a request to your specified endpoint and allows you to define the payload structure using JSON schema or JSON form for POST, PATCH, and PUT requests [(1) ]() [(2) ]() . However, it is documented that the request from Retell AI may include additional fields or wrap your payload inside a larger JSON structure, especially for custom functions. This is different from what you might send directly via Postman, and APIs like Authorize.net that expect a specific raw body may reject requests with any extra fields [(2) ]() [(3) ]() . If you have already confirmed that your custom function definition, endpoint URL, HTTP method, and payload schema are all correct, and you are still receiving a “Bad Request” from Authorize.net, the recommended solution is to have Retell AI send the request to your own backend server first. Your backend should then extract only the payload that Authorize.net expects and forward it accordingly [(1) ]() [(2) ]() [(3) ]() . This ensures that Authorize.net receives the exact format it requires and avoids any issues caused by additional metadata from Retell AI. You can review the configuration steps for Retell AI custom functions here: [Custom Function]() and [Integrate any system with custom function](https:
//docs.retellai.com/build/single-multi-prompt/custom-function) .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] custom function POST payload](https://discord.com/channels/1186424376300679209/1316491452712353804) ​
d
@AI Evy @User AI send the request to your own backend server first. Your backend should then extract only the payload that Authorize.net expects and forward it accordingly (1) (2) (3) . This ensures that Authorize.net receives the exact format it requires and avoids any issues caused by additional metadata from Retell AI. For this sugetion i already done this The payload as expected i check this okay. The issue is form retell ai server side please guide me.
a
Thanks for the follow-up, @deep_98351. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
### Answer According to official documentation, Retell AI custom function requests always include extra fields in the body—such as the function name, call context, and arguments—when sending to your endpoint [(1) ]() [(2) ]() . This differs from a raw payload sent directly via Postman. APIs like Authorize.net that require a strict payload structure may reject these extra fields, resulting in a “Bad Request” . The documented solution is to have Retell AI send the request to your backend, which then forwards only the required payload to Authorize.net . If you have already implemented this intermediary backend and verified that the forwarded payload is correct, but the issue persists, there is no further troubleshooting step or server-side fix documented in the official sources. The documentation does not provide a method for customizing how Retell AI sends the raw POST body directly to third-party APIs . If you need more help, you can review the following documentation for configuration details: - [Custom Function]() - [Integrate any system with custom function]() If the issue remains unresolved after following these steps, please confirm whether you want a general answer based on Retell AI knowledge, or check these sources for further assistance.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.