Get the full price before ordering
quote_orderGet the full price before your user orders: the items (price × quantity, at the agreed price with deal_id), shipping, sales tax and the total in USD, when the charge happens, and Egonex buyer protection (returns and refunds follow it). It only reads: nothing is ordered, reserved or charged. Pass offer_id for a new order, or request_id for an order already sent to the seller (when the seller accepts first: quote it once check_request shows ready_to_pay, right before the pay_order that charges). For an item that ships pass shipping_address; for other items, where Egonex adds sales tax, pass buyer_location. Egonex uses them only to calculate shipping and sales tax and doesn't store them. Returns a quote_id that lasts 15 minutes: pass it to request_order and pay_order, and get a payment token for exactly total. pay_order then charges exactly that total, or nothing when something changed or the quote expired (quote_changed / quote_expired): call quote_order again. Quotes that calculate sales tax are limited to 15 a minute for the same listing from the same client (slow_down). Errors end with their code in parentheses.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "quote_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deal_id | No | With offer_id, optional: deal.id from an ask_seller answer in which Ego agreed a price with you for this listing. | |
| offer_id | No | For a new order: the listing id from search_offers (the 8-character id at the end of a listing page URL also works). | |
| quantity | No | With offer_id: how many units (items, hours, sessions...). Default 1. | |
| request_id | No | Instead of offer_id, for an order already sent to the seller: the id from request_order. The quote is for that order as it was sent (its quantity and price). | |
| variant_id | No | With offer_id, required for a listing with options (its variants): the id of the variant your user chose; the quote uses that variant's price. | |
| buyer_location | No | For an item that doesn't ship, where Egonex adds sales tax: the billing address of the card your user will pay with. pay_order calculates the tax from that card's billing address, so give the full address (street, city, state, ZIP code) when you can. | |
| shipping_address | No | For an item that ships: where your user wants it shipped, the same object you will pass to pay_order (the recipient's name isn't needed here). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | Yes | What to do next. | |
| unit | Yes | What one unit is (as in the listing's price). | |
| items | Yes | unit_price × quantity, USD. | |
| title | Yes | The listing's title. | |
| total | Yes | items + shipping + sales_tax, USD. | |
| charge | Yes | When the money is taken (charge_note says how). | |
| deal_id | No | The agreed price the quote uses (from ask_seller); absent without one. | |
| variant | No | For a listing with options: the variant's values, e.g. Black / M. | |
| currency | Yes | usd. | |
| offer_id | Yes | The listing. | |
| quantity | Yes | Units quoted. | |
| quote_id | Yes | Pass it to request_order and pay_order before expires_at. | |
| shipping | Yes | Shipping in USD, once per order (0 when it doesn't ship or ships free). | |
| sales_tax | Yes | Sales tax in USD (0 when sales_tax_collected is false). | |
| expires_at | Yes | The quote works until then (RFC 3339). | |
| request_id | No | With request_id: the request whose order the quote is for (use it only with that request's pay_order). | |
| unit_price | Yes | USD per unit (the agreed price when the quote has deal_id). | |
| variant_id | No | For a listing with options: the variant quoted; absent otherwise. | |
| charge_note | Yes | When the charge happens and what happens if the seller declines. | |
| buyer_protection | Yes | Egonex buyer protection (returns and refunds always follow it). | |
| sales_tax_collected | Yes | false = Egonex doesn't add sales tax to this order. |