Documentation Index
Fetch the complete documentation index at: https://docs.trymaven.com/llms.txt
Use this file to discover all available pages before exploring further.
Retell Integration
Add PCI-compliant voice payments to your Retell AI agent. When your agent needs to collect a payment, it calls Maven to create a session and transfers the caller to Maven’s secure payment line.How It Works
Agent triggers collect_payment
During a call, your Retell agent calls the
collect_payment custom function with the amount and caller’s phone number.Maven creates a session
Maven creates a payment session and returns a phone number to transfer the caller to.
Agent transfers the caller
Your agent uses a Retell Transfer Call node to send the caller to Maven’s payment line.
Payment collected
Maven collects the card details, processes the payment, and sends a webhook with the result. The caller is optionally transferred back to your agent via the
callback number.Setup
Retell requires manual configuration of custom functions. Here’s how to set it up:Get your webhook token
In the Maven Dashboard, go to your app’s Integrations tab and generate a Retell webhook token. This gives you a URL like:
Create the collect_payment function in Retell
In your Retell agent, add a Custom Function with:
- Name:
collect_payment - URL: Your server URL from step 1
- Description:
Create a secure payment session. Returns a transfer_number to transfer the caller to. - Parameters (paste this JSON):
Add a Transfer Call node in Retell
This is a Transfer Call node, not a custom function. In your Retell agent’s conversation flow, add a Transfer Call node with:
- Routing: Dynamic — prompt the agent: “Transfer to the transfer_number returned by collect_payment.”
- Transfer type: Cold Transfer
- Displayed Caller ID: User’s Number (required — Maven matches sessions by caller ID, so this must be the caller’s number, not the agent’s)
Example System Prompt
Add something like this to your Retell agent’s system prompt. Retell provides{{user_number}} and {{agent_number}} as dynamic variables.
