Approve a visit
- When the conversation reaches
PAYMENT_REQUIRED, read thepaymentGatefromget_conversation,send_message, orwait_for_reply. - Relay
paymentGate.consultationSummaryso the patient can review what a provider may help with. - Give the patient
paymentGate.paymentUrlto open on their device. - The patient reviews their details and approves a temporary hold on the Stripe page.
- After approval, the conversation moves to
MATCHING; usewait_for_replyfor provider activity.
paymentGate.collects identifies any missing identity fields the patient must enter on the page. get_user_profile.capabilities.visit.atPayment lists those fields before the patient opens the link. Saving them with update_patient_info can shorten the form.
How the hold works
The patient sees the visit price on Stripe before approving the hold. The hold is captured only if a doctor joins. If no doctor joins, it is released. If the patient cancels while the request is inMATCHING, cancel_request releases the hold and returns the conversation to IDLE.
The patient enters card details on Stripe; card details do not pass through the agent. If the patient declines the gate, cancel_request dismisses it and the conversation remains available for chat.