{"openapi":"3.1.0","info":{"title":"Moyasar (BYOK) API","version":"0.1.0","description":"Moyasar (BYOK) lets an AI assistant read your own Moyasar data through the Moyasar API with a key you supply (secret API key (sk_live_... or sk_test_...)). Read-only: 7 tools (list_payments, fetch_payment, list_invoices, fetch_invoice, list_settlements, fetch_settlement, list_settlement_lines). 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-moyasar.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-moyasar/docs"},"termsOfService":"https://connectorbay.com/byok-moyasar/terms"},"servers":[{"url":"https://byok-moyasar.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-moyasar/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/list_payments":{"post":{"operationId":"list_payments","summary":"List payments, newest first, with status, amount and fee in the smallest currency unit, refunded and captured amounts, p","description":"List payments, newest first, with status, amount and fee in the smallest currency unit, refunded and captured amounts, payment source type and scheme. Use for \"Which Moyasar payments failed this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (40 items per page).","title":"Page"},"status":{"anyOf":[{"enum":["initiated","paid","authorized","failed","refunded","captured","voided","verified","expired"],"type":"string"},{"type":"null"}],"default":null,"description":"Only payments in this status.","title":"Status"},"created_gt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only payments created on or after this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Gt"},"created_lt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only payments created on or before this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Lt"},"card_last_digits":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only card payments whose card ends in these 4 digits (credit card, Apple Pay, Samsung Pay).","title":"Card Last Digits"},"receipt_no":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only the payment with this 12-digit retrieval reference number (RRN).","title":"Receipt No"}},"title":"list_paymentsArguments","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/fetch_payment":{"post":{"operationId":"fetch_payment","summary":"Get one payment by id: status, amount, fee, refunded and captured amounts, currency, invoice link, source type and schem","description":"Get one payment by id: status, amount, fee, refunded and captured amounts, currency, invoice link, source type and scheme. Use for \"Show Moyasar payment 3fa85f64-5717-4562-b3fc-2c963f66afa6\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Payment id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"fetch_paymentArguments","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_invoices":{"post":{"operationId":"list_invoices","summary":"List invoices with status, amount in the smallest currency unit, payment page URL, expiry and creation time. Use for \"Wh","description":"List invoices with status, amount in the smallest currency unit, payment page URL, expiry and creation time. Use for \"Which Moyasar invoices are still unpaid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (40 items per page).","title":"Page"},"status":{"anyOf":[{"enum":["initiated","paid","failed","refunded","canceled","on_hold","expired","voided"],"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices in this status.","title":"Status"},"created_gt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices created on or after this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Gt"},"created_lt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only invoices created on or before this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Lt"}},"title":"list_invoicesArguments","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/fetch_invoice":{"post":{"operationId":"fetch_invoice","summary":"Get one invoice by id: status, amount, payment page URL, expiry and times. Use for \"Show Moyasar invoice 3fa85f64-5717-4","description":"Get one invoice by id: status, amount, payment page URL, expiry and times. Use for \"Show Moyasar invoice 3fa85f64-5717-4562-b3fc-2c963f66afa6\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Invoice id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"fetch_invoiceArguments","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_settlements":{"post":{"operationId":"list_settlements","summary":"List settlements transferred to your bank account with amount, fee, tax, number of transactions and links to the settlem","description":"List settlements transferred to your bank account with amount, fee, tax, number of transactions and links to the settlement files. Use for \"What settlements did Moyasar pay out this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (40 items per page).","title":"Page"},"created_gt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only settlements created on or after this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Gt"},"created_lt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only settlements created on or before this time. Use an ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created Lt"}},"title":"list_settlementsArguments","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/fetch_settlement":{"post":{"operationId":"fetch_settlement","summary":"Get one settlement by id: amount, fee, tax, number of transactions and file links. Use for \"Show Moyasar settlement 3fa8","description":"Get one settlement by id: amount, fee, tax, number of transactions and file links. Use for \"Show Moyasar settlement 3fa85f64-5717-4562-b3fc-2c963f66afa6\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Settlement id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"fetch_settlementArguments","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_settlement_lines":{"post":{"operationId":"list_settlement_lines","summary":"List the transaction lines of one settlement (payments, refunds, fees) with payment id, gross and net amounts and fees. ","description":"List the transaction lines of one settlement (payments, refunds, fees) with payment id, gross and net amounts and fees. Use for \"Which payments were included in Moyasar settlement 3fa85f64-5717-4562-b3fc-2c963f66afa6\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Settlement id (UUID).","maxLength":200,"title":"Id","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (40 items per page).","title":"Page"}},"required":["id"],"title":"list_settlement_linesArguments","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}}}}