{"openapi":"3.1.0","info":{"title":"The Quillfield Hotel","version":"1.0.0","description":"A forty-room hotel on the harbour at Whitby, on the North Yorkshire coast. For demonstration only. This transaction runs on a test network with test money, and has no value. Every purchase is a transaction on the test network the buyer names (`network` in the request's body, a CAIP-2 id; without it, `eip155:84532`), paid in its test USDC to this shop's seller account there, and makes its own agreement, whose hash the payment carries. The doors over HTTP: each offer's door, paid by x402; and UCP's checkout (UCP 2026-08-25, https://ucp.dev/2026-08-25/services/shopping/rest.openapi.json), paid through the x402 payment handler `com.integraledger.lcp.x402` its profile declares at https://quillfield-hotel.integraledger.com/.well-known/ucp. MCP is at https://quillfield-hotel.integraledger.com/mcp. How to buy, in prose: https://quillfield-hotel.integraledger.com/llms.txt."},"servers":[{"url":"https://quillfield-hotel.integraledger.com"}],"x-service-info":{"categories":["commerce"],"docs":{"homepage":"https://quillfield-hotel.integraledger.com/","llms":"https://quillfield-hotel.integraledger.com/llms.txt","apiReference":"https://quillfield-hotel.integraledger.com/agents"}},"paths":{"/buy/double-room":{"post":{"operationId":"buy_double_room_post","summary":"Buy One night, double room","description":"A double room for one night, for two, with breakfast. Check in from three in the afternoon, and out by eleven the next morning. $95.00, paid as 0.0095 USDC. Authorise now, collect later: the whole price is authorised into escrow when bought, and collected by the seller 2 minutes after (x402 `auth-capture`). Until it is collected, it is authorised, not paid. Asks for: name. Paid by x402 on the network the body's `network` names. For demonstration only. This transaction runs on a test network with test money, and has no value.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"The signed x402 payment, base64, on the request that repeats the one answered 402.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["with"],"properties":{"with":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"slot":{"type":"string","description":"A free slot's start time, as the catalogue lists it; without one, the next free slot is booked."}},"description":"What the offer asks for. It is written into the agreement, which is public."},"network":{"type":"string","enum":["eip155:84532","eip155:5042002","eip155:43113"],"description":"The network the checkout is paid on, a CAIP-2 id; without it, `eip155:84532`. The paid request repeats it, as it repeats the whole request."}}},"example":{"with":{"name":"A. Buyer"}}}}},"x-payment-info":{"offers":[{"intent":"charge","method":"x402","amount":"9500","currency":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","description":"One night, double room: $95.00, paid as 0.0095 USDC. x402 `auth-capture` on Base Sepolia (`eip155:84532`, named `{\"network\": \"eip155:84532\"}` in the body, the default), in USDC (`0x036CbD53842c5426634e7929541eC2318f3dCF7e`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."},{"intent":"charge","method":"x402","amount":"9500","currency":"0x3600000000000000000000000000000000000000","description":"One night, double room: $95.00, paid as 0.0095 USDC. x402 `auth-capture` on Arc testnet (`eip155:5042002`, named `{\"network\": \"eip155:5042002\"}` in the body), in USDC (`0x3600000000000000000000000000000000000000`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."},{"intent":"charge","method":"x402","amount":"9500","currency":"0x5425890298aed601595a70AB815c96711a31Bc65","description":"One night, double room: $95.00, paid as 0.0095 USDC. x402 `auth-capture` on Avalanche® Fuji (`eip155:43113`, named `{\"network\": \"eip155:43113\"}` in the body), in USDC (`0x5425890298aed601595a70AB815c96711a31Bc65`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."}]},"responses":{"200":{"description":"Paid and delivered. `PAYMENT-RESPONSE` holds the x402 settlement, base64; the body holds the delivery and the proof's address.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"}}}},"202":{"description":"The payment is sent and not yet confirmed. Send the same request again, or ask the proof's record."},"400":{"description":"Refused: the request lacks what the offer asks for, names a network this shop does not know, or names one this way of paying is never paid on, or is not as this operation says."},"402":{"description":"Payment required. `PAYMENT-REQUIRED` holds the x402 version 2 `PaymentRequired`, base64; the body holds it too. Its `extensions.legalContext.info` holds the agreement's hash H and its link: fetch the link, hash the bytes with SHA-256, and sign only if they match. Send the same request again with `PAYMENT-SIGNATURE`.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}}},"502":{"description":"Paid, and not delivered: the seller tried again, and gave up. `PAYMENT-RESPONSE` holds the settlement, which succeeded; the body is the purchase."},"503":{"description":"Before a payment: the network named is not offered now, or the agreement could not be issued; nothing was taken. After a payment: paid, and not yet delivered, the seller tries again; `PAYMENT-RESPONSE` holds the settlement, which succeeded, `Retry-After` when to ask again, and the body is the purchase."}}}},"/buy/single-room":{"post":{"operationId":"buy_single_room_post","summary":"Buy One night, single room","description":"A single room for one night, with breakfast. Check in from three in the afternoon, and out by eleven the next morning. $75.00, paid as 0.0075 USDC. Authorise now, collect later: the whole price is authorised into escrow when bought, and collected by the seller 2 minutes after (x402 `auth-capture`). Until it is collected, it is authorised, not paid. Asks for: name. Paid by x402 on the network the body's `network` names. For demonstration only. This transaction runs on a test network with test money, and has no value.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"The signed x402 payment, base64, on the request that repeats the one answered 402.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["with"],"properties":{"with":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"slot":{"type":"string","description":"A free slot's start time, as the catalogue lists it; without one, the next free slot is booked."}},"description":"What the offer asks for. It is written into the agreement, which is public."},"network":{"type":"string","enum":["eip155:84532","eip155:5042002","eip155:43113"],"description":"The network the checkout is paid on, a CAIP-2 id; without it, `eip155:84532`. The paid request repeats it, as it repeats the whole request."}}},"example":{"with":{"name":"A. Buyer"}}}}},"x-payment-info":{"offers":[{"intent":"charge","method":"x402","amount":"7500","currency":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","description":"One night, single room: $75.00, paid as 0.0075 USDC. x402 `auth-capture` on Base Sepolia (`eip155:84532`, named `{\"network\": \"eip155:84532\"}` in the body, the default), in USDC (`0x036CbD53842c5426634e7929541eC2318f3dCF7e`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."},{"intent":"charge","method":"x402","amount":"7500","currency":"0x3600000000000000000000000000000000000000","description":"One night, single room: $75.00, paid as 0.0075 USDC. x402 `auth-capture` on Arc testnet (`eip155:5042002`, named `{\"network\": \"eip155:5042002\"}` in the body), in USDC (`0x3600000000000000000000000000000000000000`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."},{"intent":"charge","method":"x402","amount":"7500","currency":"0x5425890298aed601595a70AB815c96711a31Bc65","description":"One night, single room: $75.00, paid as 0.0075 USDC. x402 `auth-capture` on Avalanche® Fuji (`eip155:43113`, named `{\"network\": \"eip155:43113\"}` in the body), in USDC (`0x5425890298aed601595a70AB815c96711a31Bc65`), authorised into escrow for the payee `0xa00768eB29AC9DA2bAd0e66a8b63FBCd705aBDb3`."}]},"responses":{"200":{"description":"Paid and delivered. `PAYMENT-RESPONSE` holds the x402 settlement, base64; the body holds the delivery and the proof's address.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"}}}},"202":{"description":"The payment is sent and not yet confirmed. Send the same request again, or ask the proof's record."},"400":{"description":"Refused: the request lacks what the offer asks for, names a network this shop does not know, or names one this way of paying is never paid on, or is not as this operation says."},"402":{"description":"Payment required. `PAYMENT-REQUIRED` holds the x402 version 2 `PaymentRequired`, base64; the body holds it too. Its `extensions.legalContext.info` holds the agreement's hash H and its link: fetch the link, hash the bytes with SHA-256, and sign only if they match. Send the same request again with `PAYMENT-SIGNATURE`.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}}},"502":{"description":"Paid, and not delivered: the seller tried again, and gave up. `PAYMENT-RESPONSE` holds the settlement, which succeeded; the body is the purchase."},"503":{"description":"Before a payment: the network named is not offered now, or the agreement could not be issued; nothing was taken. After a payment: paid, and not yet delivered, the seller tries again; `PAYMENT-RESPONSE` holds the settlement, which succeeded, `Retry-After` when to ask again, and the body is the purchase."}}}},"/test/buy/double-room":{"post":{"operationId":"test_buy_double_room","summary":"Test checkout for One night, double room","description":"A checkout for testing an agent: its 402 advertises a hash with one character changed, so an agent that checks signs nothing. Nothing is sold here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["with"],"properties":{"with":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"slot":{"type":"string","description":"A free slot's start time, as the catalogue lists it; without one, the next free slot is booked."}},"description":"What the offer asks for. It is written into the agreement, which is public."},"network":{"type":"string","enum":["eip155:84532","eip155:5042002","eip155:43113"],"description":"The network the checkout is paid on, a CAIP-2 id; without it, `eip155:84532`. The paid request repeats it, as it repeats the whole request."}}},"example":{"with":{"name":"A. Buyer"}}}}},"responses":{"402":{"description":"The test checkout's challenge, whose hash does not match its agreement."}}}},"/test/buy/single-room":{"post":{"operationId":"test_buy_single_room","summary":"Test checkout for One night, single room","description":"A checkout for testing an agent: its 402 advertises a hash with one character changed, so an agent that checks signs nothing. Nothing is sold here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["with"],"properties":{"with":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"slot":{"type":"string","description":"A free slot's start time, as the catalogue lists it; without one, the next free slot is booked."}},"description":"What the offer asks for. It is written into the agreement, which is public."},"network":{"type":"string","enum":["eip155:84532","eip155:5042002","eip155:43113"],"description":"The network the checkout is paid on, a CAIP-2 id; without it, `eip155:84532`. The paid request repeats it, as it repeats the whole request."}}},"example":{"with":{"name":"A. Buyer"}}}}},"responses":{"402":{"description":"The test checkout's challenge, whose hash does not match its agreement."}}}},"/checkout-sessions":{"post":{"operationId":"ucp_create_checkout","summary":"Open a UCP checkout","description":"One line, one offer, quantity 1. At `ready_for_complete` the checkout's `ucp.payment_handlers[\"com.integraledger.lcp.x402\"]` declaration holds, as its `config`, the x402 `PaymentRequired` whose `extensions.legalContext` carries H, and its `links[]` the `legal_context` link titled `lcp:sha256:` and H. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/checkout/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/idempotency_key"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout"}}}},"responses":{"201":{"description":"The checkout, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}}},"/checkout-sessions/{id}":{"parameters":[{"$ref":"#/components/parameters/checkout_id"}],"get":{"operationId":"ucp_get_checkout","summary":"Read a UCP checkout","description":"The checkout as it stands. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/checkout/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"responses":{"200":{"description":"The checkout, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}},"put":{"operationId":"ucp_update_checkout","summary":"Update a UCP checkout","description":"The whole checkout, as it is to be. Each change of its terms issues a new agreement, with its own H. At `ready_for_complete` the checkout's `ucp.payment_handlers[\"com.integraledger.lcp.x402\"]` declaration holds, as its `config`, the x402 `PaymentRequired` whose `extensions.legalContext` carries H, and its `links[]` the `legal_context` link titled `lcp:sha256:` and H. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/checkout/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/idempotency_key"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout"}}}},"responses":{"200":{"description":"The checkout, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}}},"/checkout-sessions/{id}/complete":{"parameters":[{"$ref":"#/components/parameters/checkout_id"}],"post":{"operationId":"ucp_complete_checkout","summary":"Complete a UCP checkout","description":"Pay it: `payment.instruments` holds one instrument through the declaration of the network chosen (`handler_id` `lcp_x402_<network slug>`, as the checkout lists it; `type` `x402`), whose `credential` is `{type: \"x402\", x402Version: 2, paymentPayload, paymentRequirements}`: the x402 payment signed for the option in the handler's `config`. A failed payment is a business outcome, `payment_failed`, not an error status. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/checkout/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/idempotency_key"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout"}}}},"responses":{"200":{"description":"The checkout, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}}},"/checkout-sessions/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/checkout_id"}],"post":{"operationId":"ucp_cancel_checkout","summary":"Cancel a UCP checkout","description":"Cancel it before it is paid. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/checkout/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/idempotency_key"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"responses":{"200":{"description":"The checkout, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}}},"/orders/{id}":{"parameters":[{"$ref":"#/components/parameters/order_id"}],"get":{"operationId":"ucp_get_order","summary":"Read a UCP order","description":"The order, to the platform whose checkout made it, when the request is signed with that platform's key. Anyone else is answered the kit's summary of the delivery: its state, size and hash, never what was bought. For demonstration only. This transaction runs on a test network with test money, and has no value.","externalDocs":{"url":"https://ucp.dev/2026-08-25/specification/shopping/order/rest"},"parameters":[{"$ref":"#/components/parameters/ucp_agent"},{"$ref":"#/components/parameters/request_id"},{"$ref":"#/components/parameters/signature"},{"$ref":"#/components/parameters/signature_input"},{"$ref":"#/components/parameters/content_digest"}],"responses":{"200":{"description":"The order, or UCP's error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order_response"}}}},"401":{"description":"The platform's signature is missing or does not verify against its profile's keys."},"409":{"description":"The idempotency key was used with another body."},"422":{"description":"The platform's profile is malformed, or its UCP version is not this shop's."},"424":{"description":"The platform's profile could not be fetched."}}}}},"components":{"parameters":{"ucp_agent":{"name":"UCP-Agent","in":"header","required":true,"description":"Your platform's profile: `profile=\"<the URL of your /.well-known/ucp>\"` (RFC 8941 dictionary). This shop fetches it, and reads its capabilities and its order capability's `webhook_url`.","schema":{"type":"string"}},"idempotency_key":{"name":"Idempotency-Key","in":"header","required":true,"description":"A UUID. The same key with the same body answers what it answered; with another body, `409`. Kept for 24 hours.","schema":{"type":"string","format":"uuid"}},"request_id":{"name":"Request-Id","in":"header","required":false,"description":"A UUID, for tracing.","schema":{"type":"string","format":"uuid"}},"signature":{"name":"Signature","in":"header","required":false,"description":"RFC 9421 HTTP Message Signature by a key in your profile's `keys[]`.","schema":{"type":"string"}},"signature_input":{"name":"Signature-Input","in":"header","required":false,"schema":{"type":"string"}},"content_digest":{"name":"Content-Digest","in":"header","required":false,"schema":{"type":"string"}},"checkout_id":{"name":"id","in":"path","required":true,"description":"The checkout session's id.","schema":{"type":"string"}},"order_id":{"name":"id","in":"path","required":true,"description":"The order's id.","schema":{"type":"string"}}},"schemas":{"checkout":{"$ref":"https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"},"order":{"$ref":"https://ucp.dev/2026-08-25/schemas/shopping/order.json"},"error_response":{"$ref":"https://ucp.dev/2026-08-25/schemas/common/types/error_response.json"},"checkout_response":{"oneOf":[{"$ref":"#/components/schemas/checkout"},{"$ref":"#/components/schemas/error_response"}]},"order_response":{"oneOf":[{"$ref":"#/components/schemas/order"},{"$ref":"#/components/schemas/error_response"}]}}}}