How the pieces map to LiveKit
| Ringup piece | On LiveKit |
|---|---|
create_checkout | An HTTP POST your agent code makes when the order is confirmed |
| The transfer target | The transfer_to SIP URI the Checkout Session returns |
| The transfer | transfer_sip_participant, with the Checkout Session id in the REFER headers |
| The result | A checkout.completed webhook to your server |
Prerequisites
- A running LiveKit agent with SIP inbound configured (the caller arrives as a SIP participant).
- Your LiveKit server credentials.
- A Ringup account and API key. Test mode works out of the box on a shared sandbox. See Testing.
Step 1: Recognize the caller at the start
Callidentify from your agent code at the greeting (a plain HTTP call, like the checkout call),
not just at payment. It needs only the caller’s phone number, which is available the instant the
call connects. For a returning caller it returns their name and saved card, so your agent greets
them by name and skips re-asking for anything recognition already provides (for example, never
ask “what name for the order?” when identify returned it). This is separate from and happens
earlier than creating the Checkout Session and transferring for payment. See
Recognize at the start of the call.
Step 2: Create a Checkout Session in your agent
When your agent determines the order is confirmed,POST to Ringup’s create_checkout endpoint
with your Ringup API key. There is no platform tool to register; this is a plain HTTP call from
your agent code.
payment_required is none, do not transfer: finish the call normally. Otherwise transfer.
Step 3: Transfer the SIP participant
Speak one bridge line, then transfer the caller’s SIP participant totransfer_to, attaching the
Checkout Session id as a REFER header:
X-Session-Id header, with the id also embedded in the SIP URI as
a backstop, so correlation holds even if a middlebox strips the header.
Step 4: The return, and the result (the webhook)
Ringup answers the transferred call, recognizes the caller, charges the saved card, and texts a receipt. A first-time caller with no saved card is texted a secure pay link instead. Then the call ends one of three ways, from what you passed in Step 2:return_toset: Ringup transfers the caller back to your agent with the outcome in SIP headers (X-Payment-Status,X-Confirmation), so your agent resumes and closes the call.success_message/failure_messageset (noreturn_to): Ringup reads your line and ends.- Neither: Ringup reads a short default and ends. The receipt is the proof.
return_to that cannot connect falls back to reading your success_message (or the default),
so a failed return never strands the caller. Either way, your server reconciles from a webhook:
order_id you passed, store the payment_id, and flip your order to paid. See
Webhooks for the full catalog, statuses, signature verification, and
idempotency.
Validation status
LiveKit’stransfer_sip_participant accepts REFER headers, so the header path is supported.
Ringup’s hosted transfer endpoint is rolling out; confirm access in your Ringup dashboard before
relying on this in production. The recognition, charge, receipt, and webhook behavior is the
same payment path Ringup runs everywhere.
Next steps
Testing
The sandbox, the test card, and the fixtures to run a full payment.
Webhooks
Reconcile every payment from one signed event on your server.