{"openapi":"3.1.0","info":{"title":"Surveyor Sorted agent booking API","version":"0.2.0","description":"Quote, book and pay for RICS surveys from Surveyor Sorted through an AI assistant. The MCP connector at https://api.surveystack.co.uk/mcp does the quoting and booking; this document describes the machine-payment endpoint.","contact":{"name":"Surveyor Sorted","url":"https://www.surveyorsorted.co.uk","email":"info@surveyorsorted.co.uk"}},"servers":[{"url":"https://api.surveystack.co.uk"}],"x-service-info":{"categories":["property","surveying","professional-services"],"docs":{"homepage":"https://www.surveyorsorted.co.uk","llms":"https://api.surveystack.co.uk/llms.txt","apiReference":"https://api.surveystack.co.uk/mcp/about"},"mcp":{"endpoint":"https://api.surveystack.co.uk/mcp","manifest":"https://www.surveyorsorted.co.uk/.well-known/mcp-server"}},"paths":{"/mcp/pay/{booking_ref}":{"get":{"operationId":"getBookingFee","summary":"What is owed for a booking","parameters":[{"name":"booking_ref","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fee, currency and status."},"404":{"description":"Not found."}}},"post":{"operationId":"payBooking","summary":"Pay the fee for an agent booking (MPP, HTTP 402)","description":"Returns HTTP 402 with a Machine Payments Protocol challenge for the exact fee in GBP. Pay with a Link agent wallet (Shared Payment Token, card). On success the booking is confirmed, Surveyor Sorted emails the Terms of Engagement, and a surveyor confirms the inspection date.","parameters":[{"name":"booking_ref","in":"path","required":true,"schema":{"type":"string"},"description":"Booking reference returned by surveystack_book_survey."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"200":{"description":"Paid. Terms of Engagement are emailed for signature."},"402":{"description":"Payment required. WWW-Authenticate: Payment challenge (stripe/charge, GBP)."},"404":{"description":"No agent booking with that reference."},"409":{"description":"Booking cancelled."}},"x-payment-info":{"method":"stripe","intent":"charge","currency":"GBP","amount":null,"description":"The fixed survey fee quoted at booking (varies per booking; see the 402 challenge)."}}}}}