Create a checkout session
create_checkoutStart a TestWell order for the user: tests/panels, the US state where they will visit the lab (required for pricing and lab routing), and the buyer's name, email and phone. Returns priced line items in cents, the single $6 lab fee, the total, any blocking messages, and pay_online_url — a prefilled cart the user can pay in a browser when the platform has no payment token. Use dry_run to preview without creating a session.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"items": "<items>"
},
"name": "create_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buyer | No | ||
| items | Yes | ||
| state | No | US state code or name where the blood will be drawn | |
| dry_run | No | Price only; do not create a session |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| links | Yes | ||
| order | No | ||
| status | Yes | ||
| totals | Yes | ||
| dry_run | No | ||
| currency | Yes | ||
| messages | Yes | ||
| line_items | Yes | ||
| pay_online_url | No | Prefilled cart for browser payment when the platform has no payment token | |
| fulfillment_options | Yes |