[{"data":1,"prerenderedAt":1728},["ShallowReactive",2],{"navigation_docs":3,"-oauth-agent-checkout":224,"-oauth-agent-checkout-surround":1725},[4,157,184],{"title":5,"path":6,"stem":7,"children":8,"page":156},"Interface","\u002Finterface","1.interface",[9,53,61,68,75,82,90,97,104,111,132,139,145],{"title":10,"path":11,"stem":12,"children":13,"icon":15},"Courts","\u002Finterface\u002Fcourts","1.interface\u002F01.courts\u002F1.index",[14,16],{"title":10,"path":11,"stem":12,"icon":15},"sporty-court-sport",{"title":17,"path":18,"stem":19,"children":20,"icon":22},"Access control and lights","\u002Finterface\u002Fcourts\u002Fintegrations","1.interface\u002F01.courts\u002F5.integrations\u002F1.index",[21,23,28,33],{"title":17,"path":18,"stem":19,"icon":22},"sporty-toggle-large-on",{"title":24,"path":25,"stem":26,"icon":27},"Weblock","\u002Finterface\u002Fcourts\u002Fintegrations\u002Fweblock","1.interface\u002F01.courts\u002F5.integrations\u002F2.weblock","sporty-door-open",{"title":29,"path":30,"stem":31,"icon":32},"Shelly","\u002Finterface\u002Fcourts\u002Fintegrations\u002Fshelly","1.interface\u002F01.courts\u002F5.integrations\u002F3.shelly","sporty-bolt",{"title":34,"path":35,"stem":36,"children":37,"icon":27},"UniFi Access","\u002Finterface\u002Fcourts\u002Fintegrations\u002Funifi-access","1.interface\u002F01.courts\u002F5.integrations\u002F4.unifi-access\u002F1.index",[38,40,44,49],{"title":39,"path":35,"stem":36,"icon":27},"Overview",{"title":41,"path":42,"stem":43,"icon":22},"Connect the VPN","\u002Finterface\u002Fcourts\u002Fintegrations\u002Funifi-access\u002Fvpn","1.interface\u002F01.courts\u002F5.integrations\u002F4.unifi-access\u002F2.vpn",{"title":45,"path":46,"stem":47,"icon":48},"Create an API token","\u002Finterface\u002Fcourts\u002Fintegrations\u002Funifi-access\u002Fapi-token","1.interface\u002F01.courts\u002F5.integrations\u002F4.unifi-access\u002F3.api-token","sporty-gear",{"title":50,"path":51,"stem":52,"icon":15},"Set it up in Club Admin","\u002Finterface\u002Fcourts\u002Fintegrations\u002Funifi-access\u002Fclub-admin","1.interface\u002F01.courts\u002F5.integrations\u002F4.unifi-access\u002F4.club-admin",{"title":54,"path":55,"stem":56,"children":57,"icon":60},"Members","\u002Finterface\u002Fmembers","1.interface\u002F02.members\u002F1.index",[58],{"title":59,"path":55,"stem":56,"icon":60},"Member management","sporty-user-group",{"title":62,"path":63,"stem":64,"children":65,"icon":67},"Memberships","\u002Finterface\u002Fmemberships","1.interface\u002F03.memberships\u002F1.index",[66],{"title":62,"path":63,"stem":64,"icon":67},"sporty-id-card",{"title":69,"path":70,"stem":71,"children":72,"icon":74},"Leagues","\u002Finterface\u002Fleagues","1.interface\u002F04.leagues\u002F1.index",[73],{"title":69,"path":70,"stem":71,"icon":74},"sporty-ranking-star",{"title":76,"path":77,"stem":78,"children":79,"icon":81},"Tournaments","\u002Finterface\u002Ftournaments","1.interface\u002F05.tournaments\u002F1.index",[80],{"title":76,"path":77,"stem":78,"icon":81},"sporty-trophy",{"title":83,"path":84,"stem":85,"children":86,"icon":89},"Payments and subscriptions","\u002Finterface\u002Fpayments","1.interface\u002F06.payments\u002F1.index",[87],{"title":88,"path":84,"stem":85,"icon":89},"Payments","sporty-credit-card",{"title":91,"path":92,"stem":93,"children":94,"icon":96},"Shop","\u002Finterface\u002Fshop","1.interface\u002F07.shop\u002F1.index",[95],{"title":91,"path":92,"stem":93,"icon":96},"sporty-bag-shopping",{"title":98,"path":99,"stem":100,"children":101,"icon":103},"Schools and coaches","\u002Finterface\u002Fschools","1.interface\u002F08.schools\u002F1.index",[102],{"title":98,"path":99,"stem":100,"icon":103},"sporty-graduation-cap",{"title":105,"path":106,"stem":107,"children":108,"icon":110},"Emails","\u002Finterface\u002Femails","1.interface\u002F09.emails\u002F1.index",[109],{"title":105,"path":106,"stem":107,"icon":110},"sporty-envelope",{"title":112,"path":113,"stem":114,"children":115,"icon":117},"Video and cameras","\u002Finterface\u002Fvideo","1.interface\u002F10.video\u002F1.index",[116,118,122,127],{"title":112,"path":113,"stem":114,"icon":117},"sporty-camera-cctv",{"title":119,"path":120,"stem":121,"icon":117},"Dahua cameras","\u002Finterface\u002Fvideo\u002Fdahua","1.interface\u002F10.video\u002F2.dahua",{"title":123,"path":124,"stem":125,"icon":126},"Other RTMP cameras","\u002Finterface\u002Fvideo\u002Frtmp","1.interface\u002F10.video\u002F3.rtmp","sporty-video",{"title":128,"path":129,"stem":130,"icon":131},"Match analytics","\u002Finterface\u002Fvideo\u002Fanalytics","1.interface\u002F10.video\u002F4.analytics","sporty-chart-simple",{"title":133,"path":134,"stem":135,"children":136,"icon":138},"Reports","\u002Finterface\u002Freports","1.interface\u002F11.reports\u002F1.index",[137],{"title":133,"path":134,"stem":135,"icon":138},"sporty-chart-mixed",{"title":140,"path":141,"stem":142,"children":143,"icon":48},"Settings","\u002Finterface\u002Fsettings","1.interface\u002F12.settings\u002F1.index",[144],{"title":140,"path":141,"stem":142,"icon":48},{"title":146,"path":147,"stem":148,"children":149,"icon":151},"Social publishing","\u002Finterface\u002Fsocial","1.interface\u002F13.social\u002F1.index",[150,152],{"title":146,"path":147,"stem":148,"icon":151},"sporty-newspaper",{"title":153,"path":154,"stem":155,"icon":22},"Connecting channels","\u002Finterface\u002Fsocial\u002Fchannels","1.interface\u002F13.social\u002F2.channels",false,{"title":158,"path":159,"stem":160,"children":161,"icon":164},"Website","\u002Fwebsite","2.website\u002F1.index",[162,165,170,174,179],{"title":163,"path":159,"stem":160,"icon":164},"Website builder","sporty-browser",{"title":166,"path":167,"stem":168,"icon":169},"Pages, hero and footer","\u002Fwebsite\u002Fpages","2.website\u002F2.pages","sporty-file-lines",{"title":171,"path":172,"stem":173,"icon":151},"News and events","\u002Fwebsite\u002Fnews-and-events","2.website\u002F3.news-and-events",{"title":175,"path":176,"stem":177,"icon":178},"Coaches and gallery","\u002Fwebsite\u002Fcoaches-and-gallery","2.website\u002F4.coaches-and-gallery","sporty-images",{"title":180,"path":181,"stem":182,"icon":183},"FAQ and sponsors","\u002Fwebsite\u002Ffaq-and-sponsors","2.website\u002F5.faq-and-sponsors","sporty-circle-question",{"title":185,"path":186,"stem":187,"children":188,"icon":190},"OAuth & Sign in with Sporty","\u002Foauth","4.oauth\u002F1.index",[189,191,195,199,203,207,211,215,219],{"title":185,"path":186,"stem":187,"icon":190},"sporty-brackets-curly",{"title":192,"path":193,"stem":194,"icon":190},"Registering an application","\u002Foauth\u002Fclients","4.oauth\u002F2.clients",{"title":196,"path":197,"stem":198,"icon":190},"The authorization code flow","\u002Foauth\u002Fauthorization-code","4.oauth\u002F3.authorization-code",{"title":200,"path":201,"stem":202,"icon":190},"Scopes","\u002Foauth\u002Fscopes","4.oauth\u002F4.scopes",{"title":204,"path":205,"stem":206,"icon":190},"Sign in with Sporty","\u002Foauth\u002Fsign-in-with-sporty","4.oauth\u002F5.sign-in-with-sporty",{"title":208,"path":209,"stem":210,"icon":190},"The partner API","\u002Foauth\u002Fpartner-api","4.oauth\u002F6.partner-api",{"title":212,"path":213,"stem":214,"icon":190},"Syncing bookings","\u002Foauth\u002Fbooking-sync","4.oauth\u002F7.booking-sync",{"title":216,"path":217,"stem":218,"icon":190},"MCP and AI clients","\u002Foauth\u002Fmcp-and-ai-clients","4.oauth\u002F8.mcp-and-ai-clients",{"title":220,"path":221,"stem":222,"icon":223},"Agent checkout","\u002Foauth\u002Fagent-checkout","4.oauth\u002F9.agent-checkout","sporty-cart-shopping",{"id":225,"title":220,"body":226,"description":1716,"extension":1717,"links":1718,"meta":1719,"navigation":1720,"path":221,"seo":1721,"stem":222,"__hash__":1724},"docs\u002F4.oauth\u002F9.agent-checkout.md",{"type":227,"value":228,"toc":1704},"minimark",[229,233,271,277,290,299,304,311,368,377,386,393,397,400,410,417,755,762,765,769,779,841,859,985,988,1056,1059,1192,1207,1212,1218,1323,1346,1350,1368,1372,1389,1470,1497,1504,1508,1511,1576,1587,1590,1616,1649,1663,1667,1677,1681,1700],[230,231,232],"p",{},"An AI agent can book a court at a Sporty club and pay for it with a card the buyer gave the\nagent. There are two ways in, and they are the same checkout underneath:",[234,235,236,261],"ul",{},[237,238,239,243,244,251,252,256,257,260],"li",{},[240,241,242],"strong",{},"ACP",": the ",[245,246,250],"a",{"href":247,"rel":248},"https:\u002F\u002Fwww.agenticcommerce.dev",[249],"nofollow","Agentic Commerce Protocol"," checkout API,\nversion ",[253,254,255],"code",{},"2026-04-17",", at ",[253,258,259],{},"https:\u002F\u002Fapi.sporty.plus\u002Fapi\u002Facp",".",[237,262,263,266,267,270],{},[240,264,265],{},"MCP",": an MCP server at ",[253,268,269],{},"https:\u002F\u002Fapi.sporty.plus\u002Fmcp"," (Streamable HTTP), with tools to find\nclubs and free court time as well as the ACP checkout tools.",[230,272,273,274,260],{},"Both are described by ",[253,275,276],{},"https:\u002F\u002Fapi.sporty.plus\u002F.well-known\u002Facp.json",[230,278,279,280,285,286,289],{},"Payment is a ",[245,281,284],{"href":282,"rel":283},"https:\u002F\u002Fdocs.stripe.com\u002Fagentic-commerce\u002Fconcepts\u002Fshared-payment-tokens",[249],"Stripe shared payment token","\n(",[253,287,288],{},"spt_…","). The charge is made on the club's own Stripe account; the club is the merchant of\nrecord.",[291,292,294,295,298],"callout",{"icon":293},"i-heroicons-information-circle","A club sells through agents only once it has switched agent checkout on. Everything else on\nthis page answers ",[253,296,297],{},"403 not_sellable"," for a club that has not.",[300,301,303],"h2",{"id":302},"who-can-buy","Who can buy",[230,305,306,307,310],{},"Every request carries one of our OAuth access tokens as ",[253,308,309],{},"Authorization: Bearer",". What the token\nis decides who the buyer is.",[312,313,314,330],"table",{},[315,316,317],"thead",{},[318,319,320,324,327],"tr",{},[321,322,323],"th",{},"Token",[321,325,326],{},"Scope",[321,328,329],{},"The buyer",[331,332,333,350],"tbody",{},[318,334,335,342,347],{},[336,337,338,339],"td",{},"A member's, from the ",[245,340,341],{"href":197},"authorization code flow",[336,343,344],{},[253,345,346],{},"me.purchases.write",[336,348,349],{},"The member. They pay their own membership price, and the booking is theirs.",[318,351,352,359,365],{},[336,353,354,355,358],{},"An approved platform's ",[253,356,357],{},"client_credentials"," token",[336,360,361,364],{},[253,362,363],{},"club.checkout.write",", granted by the club",[336,366,367],{},"A guest, named by email. They pay what a newcomer pays.",[230,369,370,372,373,376],{},[253,371,346],{}," is separate from ",[253,374,375],{},"me.reservations.write",": a member who lets an application\nbook for them has not thereby let it spend their money.",[230,378,379,382,383,385],{},[240,380,381],{},"Guest checkout is for applications Sporty has reviewed",", because it creates accounts. The\nclub must also grant ",[253,384,363],{}," to the application, in its CMS under API clients.\nWhen the guest pays, we create a Sporty account for their email and send them a link to choose\na password.",[230,387,388,389,392],{},"If the email already belongs to a Sporty account, the checkout refuses with ",[253,390,391],{},"requires_sign_in",".\nTake the person through OAuth and buy as the member instead. Otherwise anyone could put\nbookings on someone else's account by typing their address.",[300,394,396],{"id":395},"finding-court-time","Finding court time",[230,398,399],{},"Checkout items are court slots. A slot's id names the court, the start in UTC, and the length:",[401,402,408],"pre",{"className":403,"code":405,"language":406,"meta":407},[404],"language-text","slot_812_20261003T1700Z_90\n","text","",[253,409,405],{"__ignoreMap":407},[230,411,412,413,416],{},"Get them from the MCP tool ",[253,414,415],{},"search_availability",", which lists the buyer's free starts with\nwhat each costs them:",[401,418,422],{"className":419,"code":420,"language":421,"meta":407,"style":407},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"club_id\": 214,\n  \"currency\": \"usd\",\n  \"timezone\": \"America\u002FNew_York\",\n  \"slots\": [\n    {\n      \"item_id\": \"slot_812_20261003T1700Z_90\",\n      \"court\": \"Court 2\",\n      \"sports\": [\"pickleball\"],\n      \"starts_at\": \"2026-10-03T13:00:00-04:00\",\n      \"ends_at\": \"2026-10-03T14:30:00-04:00\",\n      \"minutes\": 90,\n      \"total\": 6533,\n      \"amounts\": { \"price\": 6000, \"tax\": 533, \"fee\": 0, \"total\": 6533 }\n    }\n  ]\n}\n","json",[253,423,424,433,456,479,500,515,521,544,565,590,611,632,649,666,737,743,749],{"__ignoreMap":407},[425,426,429],"span",{"class":427,"line":428},"line",1,[425,430,432],{"class":431},"sMK4o","{\n",[425,434,436,439,443,446,449,453],{"class":427,"line":435},2,[425,437,438],{"class":431},"  \"",[425,440,442],{"class":441},"spNyl","club_id",[425,444,445],{"class":431},"\"",[425,447,448],{"class":431},":",[425,450,452],{"class":451},"sbssI"," 214",[425,454,455],{"class":431},",\n",[425,457,459,461,464,466,468,471,475,477],{"class":427,"line":458},3,[425,460,438],{"class":431},[425,462,463],{"class":441},"currency",[425,465,445],{"class":431},[425,467,448],{"class":431},[425,469,470],{"class":431}," \"",[425,472,474],{"class":473},"sfazB","usd",[425,476,445],{"class":431},[425,478,455],{"class":431},[425,480,482,484,487,489,491,493,496,498],{"class":427,"line":481},4,[425,483,438],{"class":431},[425,485,486],{"class":441},"timezone",[425,488,445],{"class":431},[425,490,448],{"class":431},[425,492,470],{"class":431},[425,494,495],{"class":473},"America\u002FNew_York",[425,497,445],{"class":431},[425,499,455],{"class":431},[425,501,503,505,508,510,512],{"class":427,"line":502},5,[425,504,438],{"class":431},[425,506,507],{"class":441},"slots",[425,509,445],{"class":431},[425,511,448],{"class":431},[425,513,514],{"class":431}," [\n",[425,516,518],{"class":427,"line":517},6,[425,519,520],{"class":431},"    {\n",[425,522,524,527,531,533,535,537,540,542],{"class":427,"line":523},7,[425,525,526],{"class":431},"      \"",[425,528,530],{"class":529},"sBMFI","item_id",[425,532,445],{"class":431},[425,534,448],{"class":431},[425,536,470],{"class":431},[425,538,539],{"class":473},"slot_812_20261003T1700Z_90",[425,541,445],{"class":431},[425,543,455],{"class":431},[425,545,547,549,552,554,556,558,561,563],{"class":427,"line":546},8,[425,548,526],{"class":431},[425,550,551],{"class":529},"court",[425,553,445],{"class":431},[425,555,448],{"class":431},[425,557,470],{"class":431},[425,559,560],{"class":473},"Court 2",[425,562,445],{"class":431},[425,564,455],{"class":431},[425,566,568,570,573,575,577,580,582,585,587],{"class":427,"line":567},9,[425,569,526],{"class":431},[425,571,572],{"class":529},"sports",[425,574,445],{"class":431},[425,576,448],{"class":431},[425,578,579],{"class":431}," [",[425,581,445],{"class":431},[425,583,584],{"class":473},"pickleball",[425,586,445],{"class":431},[425,588,589],{"class":431},"],\n",[425,591,593,595,598,600,602,604,607,609],{"class":427,"line":592},10,[425,594,526],{"class":431},[425,596,597],{"class":529},"starts_at",[425,599,445],{"class":431},[425,601,448],{"class":431},[425,603,470],{"class":431},[425,605,606],{"class":473},"2026-10-03T13:00:00-04:00",[425,608,445],{"class":431},[425,610,455],{"class":431},[425,612,614,616,619,621,623,625,628,630],{"class":427,"line":613},11,[425,615,526],{"class":431},[425,617,618],{"class":529},"ends_at",[425,620,445],{"class":431},[425,622,448],{"class":431},[425,624,470],{"class":431},[425,626,627],{"class":473},"2026-10-03T14:30:00-04:00",[425,629,445],{"class":431},[425,631,455],{"class":431},[425,633,635,637,640,642,644,647],{"class":427,"line":634},12,[425,636,526],{"class":431},[425,638,639],{"class":529},"minutes",[425,641,445],{"class":431},[425,643,448],{"class":431},[425,645,646],{"class":451}," 90",[425,648,455],{"class":431},[425,650,652,654,657,659,661,664],{"class":427,"line":651},13,[425,653,526],{"class":431},[425,655,656],{"class":529},"total",[425,658,445],{"class":431},[425,660,448],{"class":431},[425,662,663],{"class":451}," 6533",[425,665,455],{"class":431},[425,667,669,671,674,676,678,681,683,686,688,690,693,696,698,701,703,705,708,710,712,715,717,719,722,724,726,728,730,732,734],{"class":427,"line":668},14,[425,670,526],{"class":431},[425,672,673],{"class":529},"amounts",[425,675,445],{"class":431},[425,677,448],{"class":431},[425,679,680],{"class":431}," {",[425,682,470],{"class":431},[425,684,685],{"class":451},"price",[425,687,445],{"class":431},[425,689,448],{"class":431},[425,691,692],{"class":451}," 6000",[425,694,695],{"class":431},",",[425,697,470],{"class":431},[425,699,700],{"class":451},"tax",[425,702,445],{"class":431},[425,704,448],{"class":431},[425,706,707],{"class":451}," 533",[425,709,695],{"class":431},[425,711,470],{"class":431},[425,713,714],{"class":451},"fee",[425,716,445],{"class":431},[425,718,448],{"class":431},[425,720,721],{"class":451}," 0",[425,723,695],{"class":431},[425,725,470],{"class":431},[425,727,656],{"class":451},[425,729,445],{"class":431},[425,731,448],{"class":431},[425,733,663],{"class":451},[425,735,736],{"class":431}," }\n",[425,738,740],{"class":427,"line":739},15,[425,741,742],{"class":431},"    }\n",[425,744,746],{"class":427,"line":745},16,[425,747,748],{"class":431},"  ]\n",[425,750,752],{"class":427,"line":751},17,[425,753,754],{"class":431},"}\n",[230,756,757,758,761],{},"Find the club first with ",[253,759,760],{},"search_clubs"," (by name, city or address, and optionally sport).",[230,763,764],{},"Amounts are always integer minor units: 6533 is $65.33.",[300,766,768],{"id":767},"the-checkout-over-acp","The checkout, over ACP",[230,770,771,772,775,776,260],{},"The endpoints are ACP's. Every request sends ",[253,773,774],{},"API-Version: 2026-04-17",", and every POST sends\nan ",[253,777,778],{},"Idempotency-Key",[312,780,781,789],{},[315,782,783],{},[318,784,785,787],{},[321,786],{},[321,788],{},[331,790,791,801,811,821,831],{},[318,792,793,798],{},[336,794,795],{},[253,796,797],{},"POST \u002Fapi\u002Facp\u002Fcheckout_sessions",[336,799,800],{},"Open a checkout for one slot.",[318,802,803,808],{},[336,804,805],{},[253,806,807],{},"GET \u002Fapi\u002Facp\u002Fcheckout_sessions\u002F{id}",[336,809,810],{},"Read it.",[318,812,813,818],{},[336,814,815],{},[253,816,817],{},"POST \u002Fapi\u002Facp\u002Fcheckout_sessions\u002F{id}",[336,819,820],{},"Change the slot or the buyer.",[318,822,823,828],{},[336,824,825],{},[253,826,827],{},"POST \u002Fapi\u002Facp\u002Fcheckout_sessions\u002F{id}\u002Fcomplete",[336,829,830],{},"Pay and book.",[318,832,833,838],{},[336,834,835],{},[253,836,837],{},"POST \u002Fapi\u002Facp\u002Fcheckout_sessions\u002F{id}\u002Fcancel",[336,839,840],{},"Abandon it.",[230,842,843,846,847,850,851,854,855,858],{},[240,844,845],{},"Opening or changing a checkout books nothing."," It prices the slot, and the session is\n",[253,848,849],{},"ready_for_payment"," or ",[253,852,853],{},"not_ready_for_payment"," with ",[253,856,857],{},"messages"," saying why. Nothing is held until\nthe buyer pays, so a checkout nobody completes costs the club no court. A session expires 30\nminutes after it was last touched.",[401,860,864],{"className":861,"code":862,"language":863,"meta":407,"style":407},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST https:\u002F\u002Fapi.sporty.plus\u002Fapi\u002Facp\u002Fcheckout_sessions \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H 'API-Version: 2026-04-17' \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\n    \"line_items\": [{ \"id\": \"slot_812_20261003T1700Z_90\" }],\n    \"currency\": \"usd\",\n    \"capabilities\": {},\n    \"buyer\": { \"email\": \"jamie@example.com\", \"first_name\": \"Jamie\", \"last_name\": \"Rivera\" }\n  }'\n","bash",[253,865,866,884,901,915,935,948,957,962,967,972,977],{"__ignoreMap":407},[425,867,868,871,874,877,880],{"class":427,"line":428},[425,869,870],{"class":529},"curl",[425,872,873],{"class":473}," -X",[425,875,876],{"class":473}," POST",[425,878,879],{"class":473}," https:\u002F\u002Fapi.sporty.plus\u002Fapi\u002Facp\u002Fcheckout_sessions",[425,881,883],{"class":882},"sTEyZ"," \\\n",[425,885,886,889,891,894,897,899],{"class":427,"line":435},[425,887,888],{"class":473},"  -H",[425,890,470],{"class":431},[425,892,893],{"class":473},"Authorization: Bearer ",[425,895,896],{"class":882},"$TOKEN",[425,898,445],{"class":431},[425,900,883],{"class":882},[425,902,903,905,908,910,913],{"class":427,"line":458},[425,904,888],{"class":473},[425,906,907],{"class":431}," '",[425,909,774],{"class":473},[425,911,912],{"class":431},"'",[425,914,883],{"class":882},[425,916,917,919,921,924,927,930,933],{"class":427,"line":481},[425,918,888],{"class":473},[425,920,470],{"class":431},[425,922,923],{"class":473},"Idempotency-Key: ",[425,925,926],{"class":431},"$(",[425,928,929],{"class":529},"uuidgen",[425,931,932],{"class":431},")\"",[425,934,883],{"class":882},[425,936,937,939,941,944,946],{"class":427,"line":502},[425,938,888],{"class":473},[425,940,907],{"class":431},[425,942,943],{"class":473},"Content-Type: application\u002Fjson",[425,945,912],{"class":431},[425,947,883],{"class":882},[425,949,950,953,955],{"class":427,"line":517},[425,951,952],{"class":473},"  -d",[425,954,907],{"class":431},[425,956,432],{"class":473},[425,958,959],{"class":427,"line":523},[425,960,961],{"class":473},"    \"line_items\": [{ \"id\": \"slot_812_20261003T1700Z_90\" }],\n",[425,963,964],{"class":427,"line":546},[425,965,966],{"class":473},"    \"currency\": \"usd\",\n",[425,968,969],{"class":427,"line":567},[425,970,971],{"class":473},"    \"capabilities\": {},\n",[425,973,974],{"class":427,"line":592},[425,975,976],{"class":473},"    \"buyer\": { \"email\": \"jamie@example.com\", \"first_name\": \"Jamie\", \"last_name\": \"Rivera\" }\n",[425,978,979,982],{"class":427,"line":613},[425,980,981],{"class":473},"  }",[425,983,984],{"class":431},"'\n",[230,986,987],{},"The answer is an ACP checkout session. The parts that matter here:",[234,989,990,999,1022,1032,1050],{},[237,991,992,995,996,260],{},[253,993,994],{},"line_items[0]",": the court, club and time, and its ",[253,997,998],{},"totals",[237,1000,1001,1003,1004,1007,1008,1007,1011,1007,1013,1015,1016,1018,1019,1021],{},[253,1002,998],{},": ",[253,1005,1006],{},"items_base_amount",", ",[253,1009,1010],{},"subtotal",[253,1012,700],{},[253,1014,714],{}," (a club's card surcharge, when it\nhas one) and ",[253,1017,656],{},". A US club adds sales tax on top. A club whose prices include VAT shows the\nVAT inside the price, as ",[253,1020,700],{}," with \"(included)\".",[237,1023,1024,1027,1028,1031],{},[253,1025,1026],{},"fulfillment_options",": always one ",[253,1029,1030],{},"digital"," option. Nothing ships; the booking shows in the\nSporty app.",[237,1033,1034,1037,1038,1041,1042,1045,1046,1049],{},[253,1035,1036],{},"capabilities.payment.handlers",": one handler, ",[253,1039,1040],{},"stripe_spt"," (",[253,1043,1044],{},"dev.acp.tokenized.card","). Its\n",[253,1047,1048],{},"config.merchant_id"," is the club's Stripe account, for the token's seller details.",[237,1051,1052,1055],{},[253,1053,1054],{},"links",": our terms of use and privacy policy. Show them to the buyer.",[230,1057,1058],{},"To pay, send the token:",[401,1060,1062],{"className":419,"code":1061,"language":421,"meta":407,"style":407},"{\n  \"payment_data\": {\n    \"handler_id\": \"stripe_spt\",\n    \"instrument\": { \"type\": \"card\", \"credential\": { \"type\": \"spt\", \"token\": \"spt_123\" } }\n  }\n}\n",[253,1063,1064,1068,1082,1102,1183,1188],{"__ignoreMap":407},[425,1065,1066],{"class":427,"line":428},[425,1067,432],{"class":431},[425,1069,1070,1072,1075,1077,1079],{"class":427,"line":435},[425,1071,438],{"class":431},[425,1073,1074],{"class":441},"payment_data",[425,1076,445],{"class":431},[425,1078,448],{"class":431},[425,1080,1081],{"class":431}," {\n",[425,1083,1084,1087,1090,1092,1094,1096,1098,1100],{"class":427,"line":458},[425,1085,1086],{"class":431},"    \"",[425,1088,1089],{"class":529},"handler_id",[425,1091,445],{"class":431},[425,1093,448],{"class":431},[425,1095,470],{"class":431},[425,1097,1040],{"class":473},[425,1099,445],{"class":431},[425,1101,455],{"class":431},[425,1103,1104,1106,1109,1111,1113,1115,1117,1120,1122,1124,1126,1129,1131,1133,1135,1138,1140,1142,1144,1146,1149,1151,1153,1155,1158,1160,1162,1164,1167,1169,1171,1173,1176,1178,1181],{"class":427,"line":481},[425,1105,1086],{"class":431},[425,1107,1108],{"class":529},"instrument",[425,1110,445],{"class":431},[425,1112,448],{"class":431},[425,1114,680],{"class":431},[425,1116,470],{"class":431},[425,1118,1119],{"class":451},"type",[425,1121,445],{"class":431},[425,1123,448],{"class":431},[425,1125,470],{"class":431},[425,1127,1128],{"class":473},"card",[425,1130,445],{"class":431},[425,1132,695],{"class":431},[425,1134,470],{"class":431},[425,1136,1137],{"class":451},"credential",[425,1139,445],{"class":431},[425,1141,448],{"class":431},[425,1143,680],{"class":431},[425,1145,470],{"class":431},[425,1147,1119],{"class":1148},"swJcz",[425,1150,445],{"class":431},[425,1152,448],{"class":431},[425,1154,470],{"class":431},[425,1156,1157],{"class":473},"spt",[425,1159,445],{"class":431},[425,1161,695],{"class":431},[425,1163,470],{"class":431},[425,1165,1166],{"class":1148},"token",[425,1168,445],{"class":431},[425,1170,448],{"class":431},[425,1172,470],{"class":431},[425,1174,1175],{"class":473},"spt_123",[425,1177,445],{"class":431},[425,1179,1180],{"class":431}," }",[425,1182,736],{"class":431},[425,1184,1185],{"class":427,"line":502},[425,1186,1187],{"class":431},"  }\n",[425,1189,1190],{"class":427,"line":517},[425,1191,754],{"class":431},[230,1193,1194,1195,1198,1199,1202,1203,1206],{},"A successful completion answers ",[253,1196,1197],{},"status: \"completed\""," with an ",[253,1200,1201],{},"order",", whose ",[253,1204,1205],{},"permalink_url"," is\nthe member's bookings page on the club's site.",[1208,1209,1211],"h3",{"id":1210},"when-it-does-not-go-through","When it does not go through",[230,1213,1214,1215,1217],{},"These come back as ",[253,1216,857],{}," on the session, not as HTTP errors, because the buyer can do\nsomething about them:",[312,1219,1220,1234],{},[315,1221,1222],{},[318,1223,1224,1228,1231],{},[321,1225,1226],{},[253,1227,253],{},[321,1229,1230],{},"What happened",[321,1232,1233],{},"Session",[331,1235,1236,1251,1265,1280,1296,1310],{},[318,1237,1238,1243,1246],{},[336,1239,1240],{},[253,1241,1242],{},"payment_declined",[336,1244,1245],{},"The card was refused. Nothing was booked.",[336,1247,1248,1250],{},[253,1249,849],{},": try another token.",[318,1252,1253,1258,1261],{},[336,1254,1255],{},[253,1256,1257],{},"requires_3ds",[336,1259,1260],{},"The card asks for 3-D Secure, which agent checkout does not support yet.",[336,1262,1263],{},[253,1264,849],{},[318,1266,1267,1272,1275],{},[336,1268,1269],{},[253,1270,1271],{},"out_of_stock",[336,1273,1274],{},"Someone took the slot since it was quoted.",[336,1276,1277,1279],{},[253,1278,853],{},": pick another slot.",[318,1281,1282,1288,1291],{},[336,1283,1284,1287],{},[253,1285,1286],{},"price_change"," (warning)",[336,1289,1290],{},"The price moved since the quote, for example because a guest's first membership is priced differently. Nothing was charged.",[336,1292,1293,1295],{},[253,1294,849],{}," at the new total: confirm it with the buyer.",[318,1297,1298,1303,1306],{},[336,1299,1300],{},[253,1301,1302],{},"missing",[336,1304,1305],{},"A guest's email or name is missing.",[336,1307,1308],{},[253,1309,853],{},[318,1311,1312,1316,1319],{},[336,1313,1314],{},[253,1315,391],{},[336,1317,1318],{},"A guest's email already has a Sporty account.",[336,1320,1321],{},[253,1322,853],{},[230,1324,1325,1326,1329,1330,1333,1334,1337,1338,1341,1342,1345],{},"HTTP errors use ACP's error body, ",[253,1327,1328],{},"{type, code, message, param}",", and are for requests the agent\ngot wrong: an unknown item (",[253,1331,1332],{},"400 invalid_item_id","), a club that does not sell through agents or\nhas not allowed this application (",[253,1335,1336],{},"403","), a session that is someone else's (",[253,1339,1340],{},"404","), cancelling\na completed session (",[253,1343,1344],{},"405",").",[1208,1347,1349],{"id":1348},"idempotency","Idempotency",[230,1351,1352,1353,1355,1356,1359,1360,1363,1364,1367],{},"A POST repeated with the same ",[253,1354,778],{}," gets the first answer back, with\n",[253,1357,1358],{},"Idempotent-Replayed: true",", and nothing happens twice. That includes charging the card. The\nsame key with a different body answers ",[253,1361,1362],{},"422 idempotency_conflict",". While the first request is\nstill running, a repeat answers ",[253,1365,1366],{},"409 idempotency_in_flight",". Keys are remembered for 24 hours,\nper application and member.",[300,1369,1371],{"id":1370},"the-checkout-over-mcp","The checkout, over MCP",[230,1373,1374,1375,1378,1379,1382,1383,1386,1387,260],{},"The MCP server authenticates with the same OAuth tokens. A client without one gets ",[253,1376,1377],{},"401"," with\n",[253,1380,1381],{},"WWW-Authenticate: Bearer resource_metadata=\"…\u002F.well-known\u002Foauth-protected-resource\u002Fmcp\"",", and\nfinds our authorization server there. The client can ",[245,1384,1385],{"href":217},"register itself","\nand ask the member for ",[253,1388,346],{},[312,1390,1391,1400],{},[315,1392,1393],{},[318,1394,1395,1398],{},[321,1396,1397],{},"Tool",[321,1399],{},[331,1401,1402,1411,1420,1430,1440,1450,1460],{},[318,1403,1404,1408],{},[336,1405,1406],{},[253,1407,760],{},[336,1409,1410],{},"Clubs that sell court time through agents.",[318,1412,1413,1417],{},[336,1414,1415],{},[253,1416,415],{},[336,1418,1419],{},"Free starts at a club, priced for the buyer.",[318,1421,1422,1427],{},[336,1423,1424],{},[253,1425,1426],{},"create_checkout_session",[336,1428,1429],{},"ACP create.",[318,1431,1432,1437],{},[336,1433,1434],{},[253,1435,1436],{},"get_checkout_session",[336,1438,1439],{},"ACP get.",[318,1441,1442,1447],{},[336,1443,1444],{},[253,1445,1446],{},"update_checkout_session",[336,1448,1449],{},"ACP update.",[318,1451,1452,1457],{},[336,1453,1454],{},[253,1455,1456],{},"complete_checkout_session",[336,1458,1459],{},"ACP complete.",[318,1461,1462,1467],{},[336,1463,1464],{},[253,1465,1466],{},"cancel_checkout_session",[336,1468,1469],{},"ACP cancel.",[230,1471,1472,1473,1476,1477,1480,1481,1484,1485,1488,1489,1492,1493,1496],{},"The checkout tools follow ACP's MCP binding: arguments are ",[253,1474,1475],{},"{meta, id, payload}",", where ",[253,1478,1479],{},"meta","\ncarries ",[253,1482,1483],{},"api_version"," (required) and ",[253,1486,1487],{},"idempotency_key",", and ",[253,1490,1491],{},"payload"," is the REST body. The\nresult's ",[253,1494,1495],{},"structuredContent"," is the same checkout session the REST API answers with.",[230,1498,1499,1500,1503],{},"A refusal comes back as a tool error (",[253,1501,1502],{},"isError: true",") whose text is the ACP error object, not\nas a JSON-RPC error.",[300,1505,1507],{"id":1506},"hearing-about-the-order-afterwards","Hearing about the order afterwards",[230,1509,1510],{},"Register where your orders' events go:",[401,1512,1514],{"className":861,"code":1513,"language":863,"meta":407,"style":407},"curl -X PUT https:\u002F\u002Fapi.sporty.plus\u002Fapi\u002Facp\u002Fwebhook \\\n  -H \"Authorization: Bearer $TOKEN\" -H 'API-Version: 2026-04-17' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{ \"url\": \"https:\u002F\u002Fagent.example\u002Fagentic_commerce\u002Fwebhooks\u002Forder_events\", \"secret\": \"…\" }'\n",[253,1515,1516,1530,1553,1565],{"__ignoreMap":407},[425,1517,1518,1520,1522,1525,1528],{"class":427,"line":428},[425,1519,870],{"class":529},[425,1521,873],{"class":473},[425,1523,1524],{"class":473}," PUT",[425,1526,1527],{"class":473}," https:\u002F\u002Fapi.sporty.plus\u002Fapi\u002Facp\u002Fwebhook",[425,1529,883],{"class":882},[425,1531,1532,1534,1536,1538,1540,1542,1545,1547,1549,1551],{"class":427,"line":435},[425,1533,888],{"class":473},[425,1535,470],{"class":431},[425,1537,893],{"class":473},[425,1539,896],{"class":882},[425,1541,445],{"class":431},[425,1543,1544],{"class":473}," -H",[425,1546,907],{"class":431},[425,1548,774],{"class":473},[425,1550,912],{"class":431},[425,1552,883],{"class":882},[425,1554,1555,1557,1559,1561,1563],{"class":427,"line":458},[425,1556,888],{"class":473},[425,1558,907],{"class":431},[425,1560,943],{"class":473},[425,1562,912],{"class":431},[425,1564,883],{"class":882},[425,1566,1567,1569,1571,1574],{"class":427,"line":481},[425,1568,952],{"class":473},[425,1570,907],{"class":431},[425,1572,1573],{"class":473},"{ \"url\": \"https:\u002F\u002Fagent.example\u002Fagentic_commerce\u002Fwebhooks\u002Forder_events\", \"secret\": \"…\" }",[425,1575,984],{"class":431},[230,1577,1578,1579,1582,1583,1586],{},"Bring your own secret of at least 24 characters, or leave it out and one is made and shown to\nyou once. ",[253,1580,1581],{},"GET"," shows the webhook and its last delivery; ",[253,1584,1585],{},"DELETE"," removes it. The URL must be\nhttps on a public address.",[230,1588,1589],{},"We send ACP order events, each with the whole order:",[234,1591,1592,1598],{},[237,1593,1594,1597],{},[253,1595,1596],{},"order_create"," when a checkout is paid;",[237,1599,1600,1603,1604,1607,1608,1611,1612,1615],{},[253,1601,1602],{},"order_update"," when the booking is cancelled and refunded. The order's ",[253,1605,1606],{},"status"," becomes\n",[253,1609,1610],{},"canceled",", and its ",[253,1613,1614],{},"adjustments"," list the refund.",[401,1617,1621],{"className":1618,"code":1619,"language":1620,"meta":407,"style":407},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","POST \u002Fagentic_commerce\u002Fwebhooks\u002Forder_events\nMerchant-Signature: t=1790000000,v1=5f2c…\nContent-Type: application\u002Fjson\n\n{\"type\":\"order_create\",\"data\":{\"type\":\"order\",\"id\":\"ord_48213\",\"checkout_session_id\":\"cs_…\",\"status\":\"confirmed\", …}}\n","http",[253,1622,1623,1628,1633,1638,1644],{"__ignoreMap":407},[425,1624,1625],{"class":427,"line":428},[425,1626,1627],{},"POST \u002Fagentic_commerce\u002Fwebhooks\u002Forder_events\n",[425,1629,1630],{"class":427,"line":435},[425,1631,1632],{},"Merchant-Signature: t=1790000000,v1=5f2c…\n",[425,1634,1635],{"class":427,"line":458},[425,1636,1637],{},"Content-Type: application\u002Fjson\n",[425,1639,1640],{"class":427,"line":481},[425,1641,1643],{"emptyLinePlaceholder":1642},true,"\n",[425,1645,1646],{"class":427,"line":502},[425,1647,1648],{},"{\"type\":\"order_create\",\"data\":{\"type\":\"order\",\"id\":\"ord_48213\",\"checkout_session_id\":\"cs_…\",\"status\":\"confirmed\", …}}\n",[230,1650,1651,1654,1655,1658,1659,1662],{},[253,1652,1653],{},"v1"," is the hex HMAC-SHA256 of ",[253,1656,1657],{},"{t}.{body}"," with your secret. Refuse a ",[253,1660,1661],{},"t"," more than five\nminutes old. Delivery is at least once: a failed delivery is retried with a doubling wait, up\nto ten times.",[300,1664,1666],{"id":1665},"cancelling-and-refunds","Cancelling and refunds",[230,1668,1669,1670,1673,1674,1676],{},"A booking bought through an agent is refunded to the card it was paid with when it is\ncancelled, within the club's cancellation deadline. The buyer can cancel in the Sporty app, or\nthrough ",[253,1671,1672],{},"DELETE \u002Fapi\u002Fpartner\u002Fv1\u002Fme\u002Freservations\u002F{id}"," if the agent holds ",[253,1675,375],{},".\nThe refund includes any card surcharge.",[300,1678,1680],{"id":1679},"not-supported-yet","Not supported yet",[234,1682,1683,1686,1689,1692,1695],{},[237,1684,1685],{},"Anything but court time: memberships, events and shop items.",[237,1687,1688],{},"3-D Secure challenges.",[237,1690,1691],{},"Splitting the price between players. The buyer books the court and pays for all of it;\npartners can be added in the app.",[237,1693,1694],{},"More than one slot per checkout.",[237,1696,1697,1698,260],{},"A product feed. Court time changes by the minute, so agents find it with ",[253,1699,415],{},[1701,1702,1703],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":407,"searchDepth":435,"depth":435,"links":1705},[1706,1707,1708,1712,1713,1714,1715],{"id":302,"depth":435,"text":303},{"id":395,"depth":435,"text":396},{"id":767,"depth":435,"text":768,"children":1709},[1710,1711],{"id":1210,"depth":458,"text":1211},{"id":1348,"depth":458,"text":1349},{"id":1370,"depth":435,"text":1371},{"id":1506,"depth":435,"text":1507},{"id":1665,"depth":435,"text":1666},{"id":1679,"depth":435,"text":1680},"Let an AI agent find free court time at a club and pay for it, through the Agentic Commerce Protocol or MCP.","md",null,{},{"icon":223},{"title":1722,"description":1723},"Sporty agent checkout — book and pay for courts through ACP and MCP","Checkout sessions for court time with Stripe shared payment tokens, over the Agentic Commerce Protocol (2026-04-17) or an MCP server.","apEmZ8xbJjh1DJo976nYC03O8TyYZhETKFA3sKd6c7o",[1726,1718],{"title":216,"path":217,"stem":218,"description":1727,"icon":190,"children":-1},"Dynamic client registration, and what a self-registered client can and cannot do.",1790691909306]