Create mock session
session_createOpen a test session against an ONDC participant by supplying its URL and role (BAP/BPP); the mock acts as the counterpart and returns available flows along with a callback URL.
Instructions
Open a session against a network participant under test and list every flow available for its build. Supply the participant's subscriber URL and whether it is a BAP (buyer app) or BPP (seller app); this server automatically takes the opposite role and answers as that counterparty. Domain, version and use-case must be a published combination — call catalog_list_builds first if unsure, because an unknown use-case is rejected rather than silently returning no flows. The returned callback_url is what the participant must send its callbacks to; give it to them before starting a flow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ONDC domain code, e.g. ONDC:FIS12. | |
| np_type | Yes | What the participant under test is: BAP (buyer app) or BPP (seller app). The mock takes the opposite role. | |
| usecase | Yes | Use-case name exactly as published, e.g. 'PERSONAL LOAN'. Case- and space-sensitive. | |
| version | Yes | Spec version, e.g. 2.0.3. | |
| auto_advance | No | Defaults to on for llm_auto sessions and off for manual ones. When on, this server sends its own next step as soon as the participant answers, instead of waiting to be asked — pausing for inputs, forms and errors. You do not see less of the flow: everything sent this way comes back as a CHAIN_SENT event on your next tool result. Set it false to drive every step yourself. | |
| subscriber_id | No | Registry subscriber id of the participant, when known. | |
| subscriber_url | Yes | Base URL of the participant under test, e.g. https://bap.example.com. | |
| interaction_mode | No | 'llm_auto' (default) — you supply every input and fill forms yourself. 'manual' — a human supplies them; forms come back as links to hand over. | |
| receiver_public_url | No | Override the URL advertised for callbacks. Set this to your tunnel address (ngrok, cloudflared) whenever the participant is not on this machine — otherwise its callbacks go somewhere it cannot reach. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flows | Yes | Every flow published for this build, ready to start. | |
| total | Yes | Number of flows available. | |
| session | Yes |