{"openapi":"3.1.0","info":{"title":"Mayar (BYOK) API","version":"0.1.0","description":"Mayar (BYOK) lets an AI assistant read your own Mayar data through the Mayar API with a key you supply (Mayar API key (Read Only is enough)). Read-only: 12 tools (get_balance, get_statistics, get_daily_transactions, list_transactions, list_product_transactions, list_products, list_products_by_type, list_invoices, list_payment_requests, list_installments, get_payment_channels,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-mayar.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mayar/docs"},"termsOfService":"https://connectorbay.com/byok-mayar/terms"},"servers":[{"url":"https://byok-mayar.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mayar/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_balance":{"post":{"operationId":"get_balance","summary":"Get the account balance in rupiah: active, pending and total. Use for \"What is my Mayar balance\".","description":"Get the account balance in rupiah: active, pending and total. Use for \"What is my Mayar balance\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_balanceArguments","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_statistics":{"post":{"operationId":"get_statistics","summary":"Get aggregate statistics: total products, customers, transactions and total payment volume. Use for \"How many products a","description":"Get aggregate statistics: total products, customers, transactions and total payment volume. Use for \"How many products and sales do I have on Mayar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_statisticsArguments","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_daily_transactions":{"post":{"operationId":"get_daily_transactions","summary":"Get today's transaction statistics: date, payment volume and transaction count. Use for \"How much did I sell on Mayar to","description":"Get today's transaction statistics: date, payment volume and transaction count. Use for \"How much did I sell on Mayar today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_daily_transactionsArguments","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_transactions":{"post":{"operationId":"list_transactions","summary":"List paid transactions with amount, status, payment method and the payment link sold (customer details are not returned)","description":"List paid transactions with amount, status, payment method and the payment link sold (customer details are not returned). Use for \"What did I sell on Mayar this week and through which payment method\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by transaction status, for example settled.","title":"Status"},"type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by type, for example digital_product, event or membership.","title":"Type"},"payment_link_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only transactions of this payment link id.","title":"Payment Link Id"},"start_at":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the window: Unix milliseconds or an ISO 8601 date such as 2026-08-24.","title":"Start At"},"end_at":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"End of the window: Unix milliseconds or an ISO 8601 date.","title":"End At"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"title":"list_transactionsArguments","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_product_transactions":{"post":{"operationId":"list_product_transactions","summary":"List the transactions of one product or payment link (customer details are not returned). Use for \"Which sales did my pr","description":"List the transactions of one product or payment link (customer details are not returned). Use for \"Which sales did my product 6f8c19ff-5b97-4792-aa89-d2a12797b356 get on Mayar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Product (payment link) id from list_products.","maxLength":200,"title":"Id","type":"string"},"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by transaction status, for example settled.","title":"Status"},"start_at":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the window: Unix milliseconds or an ISO 8601 date such as 2026-08-24.","title":"Start At"},"end_at":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"End of the window: Unix milliseconds or an ISO 8601 date.","title":"End At"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"required":["id"],"title":"list_product_transactionsArguments","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_products":{"post":{"operationId":"list_products","summary":"List products and payment links (digital products, events, courses, memberships, generic links) with type, status, price","description":"List products and payment links (digital products, events, courses, memberships, generic links) with type, status, price in rupiah and public link. Use for \"Which products do I sell on Mayar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search by product name.","title":"Search"},"type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by product type, for example generic_link or digital_product.","title":"Type"},"stock":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by stock state.","title":"Stock"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"title":"list_productsArguments","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_products_by_type":{"post":{"operationId":"list_products_by_type","summary":"List products of one type, for example generic_link, digital_product, event, webinar or membership. Use for \"List all my","description":"List products of one type, for example generic_link, digital_product, event, webinar or membership. Use for \"List all my Mayar webinars\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"description":"Product type, for example generic_link.","maxLength":200,"title":"Type","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search by product name.","title":"Search"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"required":["type"],"title":"list_products_by_typeArguments","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 name, status, amount in rupiah and public link (customer details are not returned). Use for \"Which Ma","description":"List invoices with name, status, amount in rupiah and public link (customer details are not returned). Use for \"Which Mayar invoices are still unpaid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by invoice status, for example paid or unpaid.","title":"Status"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text.","title":"Search"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"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/list_payment_requests":{"post":{"operationId":"list_payment_requests","summary":"List single payment requests with description, status, amount in rupiah and public link. Use for \"Which Mayar payment re","description":"List single payment requests with description, status, amount in rupiah and public link. Use for \"Which Mayar payment requests are unpaid\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by status, for example paid or unpaid.","title":"Status"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"title":"list_payment_requestsArguments","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_installments":{"post":{"operationId":"list_installments","summary":"List installment plans with status, amount, description and public link. Use for \"Which installment plans are open on Ma","description":"List installment plans with status, amount, description and public link. Use for \"Which installment plans are open on Mayar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by status, for example paid or unpaid.","title":"Status"},"customer_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only plans of this customer id.","title":"Customer Id"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"title":"list_installmentsArguments","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_payment_channels":{"post":{"operationId":"get_payment_channels","summary":"Show which payment channels are enabled for the merchant (QRIS, cards, e-wallets) and who bears admin and channel fees. ","description":"Show which payment channels are enabled for the merchant (QRIS, cards, e-wallets) and who bears admin and channel fees. Use for \"Which payment methods are enabled on my Mayar account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_payment_channelsArguments","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_membership_tiers":{"post":{"operationId":"list_membership_tiers","summary":"List the membership tiers of a membership product with status, trial settings and grace period. Use for \"What tiers does","description":"List the membership tiers of a membership product with status, trial settings and grace period. Use for \"What tiers does my Mayar membership product have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"product_id":{"description":"Membership product id.","maxLength":200,"title":"Product Id","type":"string"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many items to return (1 to 50, default 10).","title":"Limit"},"starting_after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor for the next page: the nextStartingAfter value of the previous answer.","title":"Starting After"}},"required":["product_id"],"title":"list_membership_tiersArguments","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}}}}