Prerequisites
- A running OpenAI Realtime agent reachable over the phone (Twilio media streams, the SIP connector, or your own SIP trunk).
- The telephony account that owns the inbound call leg, and a Ringup API key.
Set up
- Using Tools
- Using Dashboard
Keep the caller on your bridge and call Ringup’s tools straight from your handler with plain HTTP.
No transfer, no payment line, and no dependence on the carrier leg honoring a SIP REFER.
1
Recognize the caller at the greeting
Call
identify at the greeting, not at payment. Pass caller_phone, which your telephony
resolved when the call connected. For a returning caller it returns their name, so your agent
greets them by name and skips questions it can already answer. An unknown caller comes back
known: false, an ordinary first call. See Recognize at the start of the
call.2
Open a Checkout Session when the order is confirmed
POST to create_checkout with the merchant and the caller. Ringup resolves the total (from the
merchant’s order when you pass order_id), applies the merchant’s
payment policy, and returns cards: the caller’s cards chargeable at
this merchant. On payment_required: "none" say nothing about payment and finish the call.3
Charge the card the caller picked
Read one card from
cards back by brand and last four with the amount. After the caller agrees,
POST to charge with the session and that card’s instrument_id. Ringup charges it off-session
on the merchant’s own processor. A decline is a 402 in the standard
error envelope, carrying the sentence your agent can speak.4
Text a link when there is no card to offer
When
cards is empty (or the charge declined), POST to send_link. The session is the only
input, and Ringup texts a secure pay link. Check sent: false means a duplicate send returned the
same link without texting again. See Send Link.5
Register your webhook endpoint
In the Ringup dashboard, under Webhooks, add your HTTPS endpoint and copy the
signing secret. Your code verifies the signature and handles
checkout.succeeded. See
Webhooks.6
Test it, then go live
Use your
rk_test_ key and call your agent from your own phone. On your first call you are texted
a link and pay with the test card 4111 1111 1111 1111 (any future expiry, any CVC); on the next
call you are recognized and pay on the saved Visa ending 1111. Expect the confirmation read back
and a test-mode checkout.succeeded. Swap in your rk_live_ key to go live.Next steps
Testing
Test mode, the test card, and the flow to run a full payment.
Webhooks
Reconcile every payment from one signed event on your server.