The mapping
| Hosted web checkout | Ringup call transfer |
|---|---|
| Create a checkout session (amount, line items, order) | Create a Checkout Session with create_checkout (amount, line items, order) |
| Get a checkout URL | Get a transfer_to SIP URI |
| Redirect the browser to it | Transfer the call to it |
| Hosted page collects payment | Ringup payment line takes payment in a voice you configure |
Redirect back to return_url | Transfer back to return_to (optional) |
checkout.session.completed webhook | checkout.completed webhook |
Creating a Checkout Session
The upfront call takes the same inputs a hosted checkout session takes: the amount, optional line items, and an optional order to settle against. Plus how you want the call to end.payment_requiredis Ringup’s policy decision for this order.nonemeans the merchant does not take payment for it: there is nothing to do, andtransfer_tois absent.requiredoroptionalmeans transfer the call totransfer_to.transfer_to(in the response) is where you send the call.return_to(in the request) is where Ringup sends the caller back. They are the two ends of the same trip.id(the Checkout Session id) is the correlation token you attach to the transfer.
The flow
After payment: three ways to end
return_to and the spoken messages are complementary. Use whichever fits; you do not need both.
- Transfer back (
return_to). Symmetric totransfer_to: Ringup transfers the caller back to your agent and attaches the outcome as SIP headers (X-Payment-Status,X-Confirmation), so your agent resumes already knowing payment succeeded and closes the call in its own voice. Best when you want to keep talking (upsell, fulfillment, goodbye). - Let Ringup speak the result (
success_message/failure_message). For developers who do not want a transfer back: tell Ringup what to read on success and on failure, and it speaks your line and ends the call. Best when payment is the last thing on the call but you still want the closing words in your words. - Neither. Ringup reads a short default confirmation and ends. The SMS receipt is the proof.
return_to that cannot connect falls back to reading the
success_message (or the default) and ending, so a failed return never strands the caller. And
Ringup speaks a short line while a return connects, so there is no dead air.
The webhook
However the call ends, your server learns the outcome from acheckout.completed
webhook, which carries the Payment (payment_id, your order_id, the
confirmation). That is your server-side source of truth, independent of what the caller heard.