Delegated Purchase (Capped)
request_delegated_purchaseUse ONLY for an owner/platform-preauthorized autonomous purchase of one of four supported micro-services under an explicit spending cap. Unlike prepare_repair, this tool does not consume an existing quoteId: it creates its own quote, accepts it, and creates checkout within the delegation. Repeating the call may create a new quote/checkout, so it is intentionally non-idempotent. Do NOT use it when quote_repair already produced a quoteId or for general repair services outside the four listed micro-services; use prepare_repair for an existing repair quote. Supports wallet rails and APPLE_PAY_AUTO. APPLE_PAY_AUTO requires one human Apple Pay approval first; when Tap returns an ACTIVE saved-card payment agreement, later purchases may be charged only within the stored cap. If provider support or authorization is missing, the flow fails closed.
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": {
"productId": "<productId>",
"description": "<description>",
"authorizedMerchant": "<authorizedMerchant>",
"maxAmountUsd": "<maxAmountUsd>",
"authorizeCheckout": "<authorizeCheckout>"
},
"name": "request_delegated_purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Optional attribution label for the calling agent or integration. | |
| productId | Yes | Exactly one of the four services allowed for delegated purchase. For any other repair service, use diagnose_issue → quote_repair → prepare_repair. | |
| description | Yes | Sanitized bounded work description for the delegated micro-service; never include secrets, credentials or private keys. | |
| paymentRail | No | Delegated-purchase rail policy. AUTO chooses an eligible wallet rail; APPLE_PAY_AUTO uses or establishes the capped Tap authorization. This is not the manual rail selection for prepare_repair. | |
| maxAmountUsd | Yes | Owner/platform per-purchase spending cap in USD-equivalent. The quote must fit inside this cap and the service launch price. | |
| dailyLimitUsd | No | Requested daily APPLE_PAY_AUTO cap used only during first-time authorization setup; maximum 20 USD. | |
| authorizeCheckout | Yes | Explicit permission for this tool to create its own quote, accept it, and create checkout within the supplied cap. If a quoteId already exists, use prepare_repair instead. | |
| authorizedMerchant | Yes | Merchant scope explicitly authorized by the owner/platform for this delegated purchase flow. | |
| applePayAuthorizationToken | No | Opaque token returned by the one-time APPLE_PAY_AUTO setup. Supply only a token from this delegated authorization flow; never provide card data or raw Apple Pay payloads. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | No | Repair/delivery job attached by the existing verified-payment workflow when available; may be null. | |
| error | No | Fail-closed error code when delegation, price, provider authorization, quote, checkout, or payment requirements are not satisfied. | |
| state | No | Provider/checkout state when returned. | |
| status | No | Delegated-purchase state such as PAYMENT_REQUIRED, ONE_TIME_APPLE_PAY_AUTHORIZATION_REQUIRED, APPLE_PAY_AUTHORIZATION_NOT_ACTIVE, or a provider payment state. | |
| details | No | Bounded provider/commerce error details when available. | |
| quoteId | No | Quote created by this delegated call. It was not supplied by the caller. | |
| nextTool | No | For wallet rails, verify_checkout_payment after the payer submits the exact transfer. | |
| verified | No | When returned by the provider flow, true only for a verified payment. | |
| paymentId | No | Verified payment identifier when returned by the provider flow. | |
| productId | No | One of the four delegated micro-service product identifiers. | |
| checkoutId | No | Checkout created by this delegated call when quote creation/acceptance succeeded. | |
| payerAction | No | Required human/payer action before payment can be considered complete. | |
| paymentRail | No | Rail actually selected for this delegated purchase. | |
| automaticJob | No | False when no verified-payment job has been attached yet. | |
| authorization | No | APPLE_PAY_AUTO authorization setup/status information, potentially including the one-time human authorization URL/token. Never interpret this object alone as payment success. | |
| automaticQuote | No | True when this tool created the delegated quote itself. | |
| automaticPayment | No | False for wallet flows and authorization setup; may only become provider-driven within a previously ACTIVE APPLE_PAY_AUTO agreement. | |
| automaticCheckout | No | True when this tool created checkout under the delegation. | |
| nextToolArguments | No | Suggested verification arguments for the wallet checkout; txHash remains caller-supplied after payment. | |
| automaticExecution | No | False until the existing post-payment workflow has verified payment; this tool does not execute unpaid work. | |
| automaticAcceptance | No | True when the delegated quote was automatically accepted under explicit owner/platform authorization. | |
| paymentInstructions | No | Wallet transfer instructions for an existing delegated checkout; the tool does not send the transfer. | |
| delegatedAuthorization | No | Echo of the enforced merchant/spending delegation, including cap and whether quote acceptance/checkout creation were authorized. |