ResourcesPayment Links

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"
{
  "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"
    }
  ]
}
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"
  }'
{
  "url": "https://checkout.stripe.com/c/pay/cs_live_a1b2c3d4e5f6"
}
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"
  }'
{
  "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
}
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"
  }'
{
  "success": true,
  "roomName": "outbound_northstar_sales_5a72",
  "sipCallId": "CA7f4a91c2d8e6b3f0a1c5d9e4b7f2a6c",
  "max_duration_seconds": 300,
  "to_number": "+14155550184"
}

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

MethodPathPurposeAuth
GET/api/pay/agent/{slug}Load payment-link details, credit packs, and preview availabilityPublic
POST/api/pay/agent/checkoutCreate a Stripe Checkout session for a credit packPublic
POST/api/pay/agent/{slug}/preview-tokenCreate a browser preview-call tokenPublic
POST/api/pay/agent/{slug}/preview-outboundStart an outbound preview callPublic

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

path
slugstring
Required

The public payment-link slug.

Response fields

linkobject
Required

The public payment-link configuration.

link.slugstring
Required

The payment-link slug.

link.namestring
Required

Display name for the agent or payment link.

link.setup_fee_usdnumber
Required

One-time setup fee in US dollars.

link.bonus_percentnumber
Required

Bonus percentage applied to the link's offer.

link.kindstring
Required

Payment-link type. AI employee links require a draft token during checkout.

packsarray
Required

Credit packs available for purchase through the link.

packs[].namestring
Required

Display name for the credit pack.

packs[].variant_idstring
Required

Identifier to send as variantId when creating checkout.

packs[].creditsnumber
Required

Number of credits included in the pack.

packs[].price_usdnumber
Required

Pack price in US dollars.

packs[].descriptionstring
Required

Description displayed with the pack.

previewobject
Required

Summary of the default preview-call option.

preview.availableboolean
Required

Whether a preview call is available.

preview.assistant_namestring

Name of the default preview assistant.

preview.phonestring

Phone number associated with the default preview assistant.

preview_assistantsarray
Required

Assistants available for preview calls.

preview_assistants[].idstring
Required

UUID of an available preview assistant.

preview_assistants[].namestring
Required

Display name of the preview assistant.

preview_assistants[].phonestring
Required

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

body
slugstring
Required

Public payment-link slug returned by the agent details endpoint.

body
variantIdstring
Required

Credit-pack variant identifier from packs[].variant_id.

body
emailstring
Required

Customer email address. The value must be a valid email address and must not belong to an existing Talkturo user.

body
draftTokenstring

Draft token for an AI employee payment link. Required when the link's kind is an AI employee link.

Response fields

urlstring or null
Required

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 matches slug.
  • 404 pack_not_found: No pack matches variantId for 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

path
slugstring
Required

Public payment-link slug.

Body parameters

body
visitor_namestring

Name to associate with the preview visitor.

body
assistant_idstring

UUID of the preview assistant to use.

body
draft_tokenstring

Draft token for an AI employee preview.

Response fields

tokenstring
Required

Token used to authenticate the browser preview connection.

wsUrlstring
Required

WebSocket URL for the preview connection.

roomNamestring
Required

Room identifier for the preview call.

identitystring
Required

Visitor identity assigned to the preview connection.

agentNamestring
Required

Display name of the agent handling the preview.

max_duration_secondsnumber
Required

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

path
slugstring
Required

Public payment-link slug.

Body parameters

body
to_numberstring
Required

Destination phone number in E.164 format, such as +14155550184.

body
visitor_namestring

Name to associate with the preview caller.

body
visitor_emailstring

Email address to associate with the preview caller.

body
assistant_idstring

UUID of the assistant that should handle the outbound preview.

Response fields

successboolean
Required

Indicates whether the outbound preview call was started.

roomNamestring
Required

Room identifier for the outbound call.

sipCallIdstring
Required

Identifier for the SIP call.

max_duration_secondsnumber
Required

Maximum call duration in seconds. The outbound preview limit is 300.

to_numberstring
Required

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_number is missing or is not in E.164 format.
  • consent_given is missing or is not true.
  • The selected country is not allowed.
  • The caller exceeds an IP or phone-number rate limit.
  • The payment link or selected assistant is unavailable.