Payment Links
Create public payment links and preview-call sessions for Talkturo agents, with endpoint details, request examples, responses, limits, and errors.
curl "https://app.talkturo.com/api/pay/agent/northstar-sales"
const response = await fetch(
"https://app.talkturo.com/api/pay/agent/northstar-sales"
);
const data = await response.json();
console.log(data);
{
"link": {
"slug": "northstar-sales",
"name": "Northstar Sales Agent",
"setup_fee_usd": 49,
"bonus_percent": 10,
"kind": "standard"
},
"packs": [
{
"name": "Starter pack",
"variant_id": "pack_8f3c2a1d",
"credits": 100,
"price_usd": 29,
"description": "100 minutes for initial customer calls"
},
{
"name": "Growth pack",
"variant_id": "pack_4b7e9c20",
"credits": 500,
"price_usd": 119,
"description": "500 minutes for active sales campaigns"
}
],
"preview": {
"available": true,
"assistant_name": "Northstar Sales Agent",
"phone": "+14155550184"
},
"preview_assistants": [
{
"id": "3f9e6a12-4a54-4c7b-9c31-28ab4d8e1f60",
"name": "Northstar Sales Agent",
"phone": "+14155550184"
}
]
}
{
"error": "link_not_found"
}
curl -X POST "https://app.talkturo.com/api/pay/agent/checkout" \
-H "Content-Type: application/json" \
-d '{
"slug": "northstar-sales",
"variantId": "pack_8f3c2a1d",
"email": "maya.chen@northstar.io"
}'
const response = await fetch(
"https://app.talkturo.com/api/pay/agent/checkout",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
slug: "northstar-sales",
variantId: "pack_8f3c2a1d",
email: "maya.chen@northstar.io"
})
}
);
const data = await response.json();
console.log(data);
{
"url": "https://checkout.stripe.com/c/pay/cs_live_a1b2c3d4e5f6"
}
{
"error": "invalid_body"
}
{
"error": "pack_not_found"
}
{
"error": "email_exists"
}
curl -X POST "https://app.talkturo.com/api/pay/agent/northstar-sales/preview-token" \
-H "Content-Type: application/json" \
-d '{
"visitor_name": "Maya Chen",
"assistant_id": "3f9e6a12-4a54-4c7b-9c31-28ab4d8e1f60"
}'
const response = await fetch(
"https://app.talkturo.com/api/pay/agent/northstar-sales/preview-token",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
visitor_name: "Maya Chen",
assistant_id: "3f9e6a12-4a54-4c7b-9c31-28ab4d8e1f60"
})
}
);
const data = await response.json();
console.log(data);
{
"token": "rtc_token_example_7f4a91c2",
"wsUrl": "wss://realtime.talkturo.com/preview",
"roomName": "preview_northstar_sales_8c42",
"identity": "visitor_4d91",
"agentName": "Northstar Sales Agent",
"max_duration_seconds": 300
}
{
"error": "preview_unavailable"
}
curl -X POST "https://app.talkturo.com/api/pay/agent/northstar-sales/preview-outbound" \
-H "Content-Type: application/json" \
-d '{
"to_number": "+14155550184",
"consent_given": true,
"visitor_name": "Maya Chen",
"visitor_email": "maya.chen@northstar.io",
"assistant_id": "3f9e6a12-4a54-4c7b-9c31-28ab4d8e1f60"
}'
const response = await fetch(
"https://app.talkturo.com/api/pay/agent/northstar-sales/preview-outbound",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
to_number: "+14155550184",
consent_given: true,
visitor_name: "Maya Chen",
visitor_email: "maya.chen@northstar.io",
assistant_id: "3f9e6a12-4a54-4c7b-9c31-28ab4d8e1f60"
})
}
);
const data = await response.json();
console.log(data);
{
"success": true,
"roomName": "outbound_northstar_sales_5a72",
"sipCallId": "CA7f4a91c2d8e6b3f0a1c5d9e4b7f2a6c",
"max_duration_seconds": 300,
"to_number": "+14155550184"
}
{
"error": "consent_required"
}
Create public payment and preview experiences
Use the payment-link API to load an agent's public offer, create Stripe Checkout sessions, and start browser or outbound preview calls. These endpoints are unauthenticated and intended for public payment pages and preview-call flows.
Payment-link endpoints are public. They use CORS origin checking instead of authenticated API credentials. Send requests to https://app.talkturo.com.
Existing Talkturo users cannot purchase through public payment links. Send those users to the in-app billing system instead.
Endpoint summary
| Method | Path | Purpose | Auth |
|---|---|---|---|
GET | /api/pay/agent/{slug} | Load payment-link details, credit packs, and preview availability | Public |
POST | /api/pay/agent/checkout | Create a Stripe Checkout session for a credit pack | Public |
POST | /api/pay/agent/{slug}/preview-token | Create a browser preview-call token | Public |
POST | /api/pay/agent/{slug}/preview-outbound | Start an outbound preview call | Public |
Get payment-link details
GET /api/pay/agent/{slug} returns the public offer, available credit packs, and preview-call options for an agent payment link.
Request
Response
The response uses Cache-Control: no-store, so payment pages should request current link and pack data instead of relying on a cached browser response.
Path parameters
The public payment-link slug.
Response fields
The public payment-link configuration.
The payment-link slug.
Display name for the agent or payment link.
One-time setup fee in US dollars.
Bonus percentage applied to the link's offer.
Payment-link type. AI employee links require a draft token during checkout.
Credit packs available for purchase through the link.
Display name for the credit pack.
Identifier to send as variantId when creating checkout.
Number of credits included in the pack.
Pack price in US dollars.
Description displayed with the pack.
Summary of the default preview-call option.
Whether a preview call is available.
Name of the default preview assistant.
Phone number associated with the default preview assistant.
Assistants available for preview calls.
UUID of an available preview assistant.
Display name of the preview assistant.
Phone number associated with the preview assistant.
Create a checkout session
POST /api/pay/agent/checkout creates a Stripe Checkout session for a pack listed by the payment-link details endpoint.
Request
Response
Open the returned url in the customer's browser. The URL is null when the checkout session does not produce a Stripe Checkout URL.
Talkturo blocks existing users from buying through public payment links. If the API returns email_exists, direct the customer to in-app billing.
Body parameters
Public payment-link slug returned by the agent details endpoint.
Credit-pack variant identifier from packs[].variant_id.
Customer email address. The value must be a valid email address and must not belong to an existing Talkturo user.
Draft token for an AI employee payment link. Required when the link's kind is an AI employee link.
Response fields
Stripe Checkout URL. Redirect the customer to this URL to complete payment.
Checkout errors
400 invalid_body: The request body is missing required fields or contains an invalid email.400 draft_required: The payment link requires a draft token.400 draft_invalid: The supplied draft token is invalid.400 invalid_pack_price: The selected pack has an invalid price.404 link_not_found: No payment link matchesslug.404 pack_not_found: No pack matchesvariantIdfor the payment link.409 email_exists: The email belongs to an existing Talkturo user.
Create a browser preview token
POST /api/pay/agent/{slug}/preview-token creates the short-lived connection details required to start a browser preview call.
Request
Response
Use the returned token, WebSocket URL, room name, and identity to connect the browser preview client. Standard links allow a maximum duration of 300 seconds. AI employee drafts allow a maximum duration of 180 seconds.
Path parameters
Public payment-link slug.
Body parameters
Name to associate with the preview visitor.
UUID of the preview assistant to use.
Draft token for an AI employee preview.
Response fields
Token used to authenticate the browser preview connection.
WebSocket URL for the preview connection.
Room identifier for the preview call.
Visitor identity assigned to the preview connection.
Display name of the agent handling the preview.
Maximum preview duration in seconds. Standard links return 300; AI employee drafts return 180.
Preview-token requests are limited to 30 per hour and 100 per day per IP address. A 404 response indicates that no preview is available or that the AI employee draft is exhausted.
Start an outbound preview call
POST /api/pay/agent/{slug}/preview-outbound starts a preview call to a customer's phone number.
Request
Response
The call can last up to 300 seconds. The destination number must use E.164 format, and country restrictions may apply.
Path parameters
Public payment-link slug.
Body parameters
Destination phone number in E.164 format, such as +14155550184.
Must be true before Talkturo starts the outbound preview call.
Name to associate with the preview caller.
Email address to associate with the preview caller.
UUID of the assistant that should handle the outbound preview.
Response fields
Indicates whether the outbound preview call was started.
Room identifier for the outbound call.
Identifier for the SIP call.
Maximum call duration in seconds. The outbound preview limit is 300.
Normalized destination phone number.
Outbound preview requests are limited to 10 per hour and 30 per day per IP address, with an additional limit of 3 calls per phone number in a 6-hour period. A country allowlist may also restrict the destination.
Outbound preview validation
The endpoint rejects requests when:
to_numberis missing or is not in E.164 format.consent_givenis missing or is nottrue.- The selected country is not allowed.
- The caller exceeds an IP or phone-number rate limit.
- The payment link or selected assistant is unavailable.