{"openapi":"3.1.0","info":{"title":"Scalapay (BYOK) API","version":"0.1.0","description":"Scalapay (BYOK) lets an AI assistant read your own Scalapay data through the Scalapay API with a key you supply (Scalapay production secret API key). Read-only: 7 tools (get_order, find_orders_by_reference, report_orders, report_refunds, list_payouts, get_payout_orders, get_payout_refunds). The BYOK key travels with each request, is used for that one call only and is never stored, logged or...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-scalapay.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-scalapay/docs"},"termsOfService":"https://connectorbay.com/byok-scalapay/terms"},"servers":[{"url":"https://byok-scalapay.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-scalapay/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_order":{"post":{"operationId":"get_order","summary":"Get one Scalapay online order by its token: status, capture status, amount and your merchant reference (customer details","description":"Get one Scalapay online order by its token: status, capture status, amount and your merchant reference (customer details are left out). Use for \"What is the status of Scalapay order 71KH916VPE\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"token":{"description":"Order token returned when the order was created.","maxLength":200,"title":"Token","type":"string"}},"required":["token"],"title":"get_orderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/find_orders_by_reference":{"post":{"operationId":"find_orders_by_reference","summary":"Find Scalapay orders by order token, your merchant order reference or processor reference (at least one; several are com","description":"Find Scalapay orders by order token, your merchant order reference or processor reference (at least one; several are combined with AND). Use for \"Which Scalapay order belongs to my reference merchantOrder-5678\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"order_token":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Order token to search for.","title":"Order Token"},"merchant_order_reference":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Your own order reference to search for.","title":"Merchant Order Reference"},"merchant_processor_reference":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Your payment processor reference to search for.","title":"Merchant Processor Reference"}},"title":"find_orders_by_referenceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/report_orders":{"post":{"operationId":"report_orders","summary":"List orders for bank reconciliation in a date window with status, product, capture amount and payout details (Pay in 3, ","description":"List orders for bank reconciliation in a date window with status, product, capture amount and payout details (Pay in 3, Pay in 4, instore). Use for \"Which Scalapay orders were captured last week and in which payout\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"First day of the window, written YYYY-MM-DD (default: today).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Last day of the window, written YYYY-MM-DD (default: today).","title":"End Date"},"size":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (default 5000; ask for fewer to keep answers short).","title":"Size"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"Page"}},"title":"report_ordersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/report_refunds":{"post":{"operationId":"report_refunds","summary":"List refunds for bank reconciliation in a date window, as the reporting endpoint returns them. Use for \"Which Scalapay r","description":"List refunds for bank reconciliation in a date window, as the reporting endpoint returns them. Use for \"Which Scalapay refunds did I issue this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"First day of the window, written YYYY-MM-DD (default: today).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Last day of the window, written YYYY-MM-DD (default: today).","title":"End Date"},"size":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (default 5000; ask for fewer to keep answers short).","title":"Size"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"Page"}},"title":"report_refundsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_payouts":{"post":{"operationId":"list_payouts","summary":"List payouts Scalapay made to you in a date window with payout token, date, total amount and status. Use for \"How much d","description":"List payouts Scalapay made to you in a date window with payout token, date, total amount and status. Use for \"How much did Scalapay pay out to me recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"First day of the window, written YYYY-MM-DD (default: today).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Last day of the window, written YYYY-MM-DD (default: today).","title":"End Date"},"size":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (default 5000; ask for fewer to keep answers short).","title":"Size"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"Page"}},"title":"list_payoutsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_payout_orders":{"post":{"operationId":"get_payout_orders","summary":"List the orders settled in one payout with gross, net and fee amounts. Use for \"Which orders were in Scalapay payout 3BQ","description":"List the orders settled in one payout with gross, net and fee amounts. Use for \"Which orders were in Scalapay payout 3BQD2I26MRG3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"token":{"description":"Payout token (merchantPayoutToken) from list_payouts.","maxLength":200,"title":"Token","type":"string"},"size":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (default 5000; ask for fewer to keep answers short).","title":"Size"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"Page"}},"required":["token"],"title":"get_payout_ordersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_payout_refunds":{"post":{"operationId":"get_payout_refunds","summary":"List the refunds netted in one payout, as the reporting endpoint returns them. Use for \"Which refunds were deducted in S","description":"List the refunds netted in one payout, as the reporting endpoint returns them. Use for \"Which refunds were deducted in Scalapay payout 3BQD2I26MRG3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"token":{"description":"Payout token (merchantPayoutToken) from list_payouts.","maxLength":200,"title":"Token","type":"string"},"size":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (default 5000; ask for fewer to keep answers short).","title":"Size"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Page number, starting at 0.","title":"Page"}},"required":["token"],"title":"get_payout_refundsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}