Why this exists
A payment capture session started when the agent isn't actually on a call ends up timing out and leaving stale sessions in your audit logs. A session started during a warm transfer can collect card details against the wrong agent ID. The Active Call Check endpoint lets you confirm the agent has a live, stable leg before you fire the payment initiation.
Endpoint
GET https://accounts.paytia.com/api/payment_service?agent_id=…
Authentication via X-API-KEY. The response tells you whether the agent has an active call, its duration, and the caller ID if available.
When to call it
- Immediately before firing a Payment Service INIT — belt and braces to catch race conditions.
- On the agent clicking "Take payment" in your CRM — disable the button if the agent isn't on a live call.
- As a health-check in your internal dashboards — spot agents stuck with orphan sessions.
Coming in the explorer
The fields for Active Call Check are being added to the interactive try-it explorer. In the meantime, request a sandbox keyand we'll send the full field list and example responses with it.