Prerequisites
- A Vapi agent you already run, with a phone number.
- Your Vapi API key.
- A Ringup account and API key (from your Ringup dashboard). Test mode works out of the box on a shared sandbox, so there is nothing to connect. See Testing.
Step 1: Add the Ringup checkout tool to your agent
This is the one-time setup. Create an apiRequest tool in Vapi that calls Ringup’screate_checkout endpoint with your Ringup API key, and attach it to your agent. Add it in the
Vapi dashboard (Tools, then Create Tool, then apiRequest) or via the API:
toolIds), and add one line to
its prompt:
When the caller has confirmed their order, call create_checkout with the order total.
That is the whole setup. Your agent is otherwise unchanged.
Step 2: Create a Checkout Session
When the order is confirmed, your agent callscreate_checkout. If payment_required comes
back none, carry on. If required or optional, it returns a transfer_to SIP URI.
order_id and line_items mirror a checkout. return_to transfers the caller back to your
agent after payment (the twin of transfer_to), or pass success_message / failure_message
to have Ringup read the result and end. The id and transfer_to are what Step 3 uses.
Step 3: Transfer, silently and with context
- No destination
message, so the caller hears no robotic announcement. Therequest-startline covers the brief connect gap so there is never dead air. blind-transfer-add-summary-to-sip-headerhands the payment line a short summary of the call in a SIP header, so it opens already knowing the order rather than re-asking.
The payment line’s voice and model are configurable in your Ringup dashboard, so you can match
it to your agent. The caller is recognized from the number your agent already has, so
recognition does not depend on the caller ID surviving the transfer.
Step 4: After payment
Ringup charges and texts the caller a receipt. Then the call ends one of three ways:return_to
transfers the caller back to your agent with the outcome in the SIP headers so your agent closes
in its own voice; success_message / failure_message has Ringup read your line and end; or
neither, and Ringup reads a short default and ends. Either way, your server reconciles from a
checkout.completed webhook, which carries the Payment (payment_id, your order_id, the
confirmation). See Webhooks for the event catalog and statuses.