{"openapi":"3.1.0","info":{"title":"PAY.JP (BYOK) API","version":"0.1.0","description":"PAY.JP (BYOK) lets an AI assistant read your own PAY.JP data through the PAY.JP API with a key you supply (secret key (sk_live_... or sk_test_...)). Read-only: 9 tools (get_account, list_charges, get_charge, list_customers, list_plans, list_subscriptions, get_subscription, list_balances, list_events). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-payjp.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-payjp/docs"},"termsOfService":"https://connectorbay.com/byok-payjp/terms"},"servers":[{"url":"https://byok-payjp.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-payjp/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_account":{"post":{"operationId":"get_account","summary":"Show the PAY.JP account the key belongs to: account id, team id, country, default currency, accepted card brands and liv","description":"Show the PAY.JP account the key belongs to: account id, team id, country, default currency, accepted card brands and live-mode status. Use for \"Which PAY.JP account is this key for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_accountArguments","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_charges":{"post":{"operationId":"list_charges","summary":"List payments newest first with amount, currency, paid and captured flags, refunds, failure reason, customer and card br","description":"List payments newest first with amount, currency, paid and captured flags, refunds, failure reason, customer and card brand; filter by customer, subscription and creation time. Card numbers are not returned by this tool. Use for \"What PAY.JP payments came in during October 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only payments of this customer id (cus_...).","title":"Customer"},"subscription":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only payments of this subscription id (sub_...).","title":"Subscription"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_chargesArguments","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_charge":{"post":{"operationId":"get_charge","summary":"Get one payment by id with amount, status flags, refunds, failure reason, customer, subscription and card brand and coun","description":"Get one payment by id with amount, status flags, refunds, failure reason, customer, subscription and card brand and country. Use for \"What happened to PAY.JP payment ch_cce2fce62e9cb5632b3d38b0b1621\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"charge_id":{"description":"Payment id starting with 'ch_'.","maxLength":64,"title":"Charge Id","type":"string"}},"required":["charge_id"],"title":"get_chargeArguments","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_customers":{"post":{"operationId":"list_customers","summary":"List customers newest first with id, description, default card id and creation time (email addresses are not returned by","description":"List customers newest first with id, description, default card id and creation time (email addresses are not returned by this tool). Use for \"Which PAY.JP customers were created recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_customersArguments","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_plans":{"post":{"operationId":"list_plans","summary":"List recurring-payment plans with amount, currency, interval, billing day and trial days. Use for \"Which subscription pl","description":"List recurring-payment plans with amount, currency, interval, billing day and trial days. Use for \"Which subscription plans exist in PAY.JP\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_plansArguments","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_subscriptions":{"post":{"operationId":"list_subscriptions","summary":"List subscriptions newest first with status, plan, customer, billing period and cancel or pause times; filter by plan, c","description":"List subscriptions newest first with status, plan, customer, billing period and cancel or pause times; filter by plan, customer and status. Use for \"Which PAY.JP subscriptions are active\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"plan":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only subscriptions of this plan id (pln_...).","title":"Plan"},"customer":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only subscriptions of this customer id (cus_...).","title":"Customer"},"status":{"anyOf":[{"enum":["active","trial","canceled","paused"],"type":"string"},{"type":"null"}],"default":null,"description":"Subscription status.","title":"Status"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_subscriptionsArguments","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_subscription":{"post":{"operationId":"get_subscription","summary":"Get one subscription by id with status, plan, customer, billing period and cancel or pause times. Use for \"What is the s","description":"Get one subscription by id with status, plan, customer, billing period and cancel or pause times. Use for \"What is the state of PAY.JP subscription sub_567a1e44562932ec1a7682d746e0\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"subscription_id":{"description":"Subscription id starting with 'sub_'.","maxLength":64,"title":"Subscription Id","type":"string"}},"required":["subscription_id"],"title":"get_subscriptionArguments","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_balances":{"post":{"operationId":"list_balances","summary":"List balances (settlement units) with state, net amount, due date and closed flag; filter by state, closed flag and due ","description":"List balances (settlement units) with state, net amount, due date and closed flag; filter by state, closed flag and due date. Use for \"What PAY.JP balances are due for payout\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only balances in this state.","title":"State"},"closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for closed balances only, false for open ones.","title":"Closed"},"since_due_date":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only balances due at or after this Unix timestamp.","title":"Since Due Date"},"until_due_date":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only balances due at or before this Unix timestamp.","title":"Until Due Date"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_balancesArguments","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_events":{"post":{"operationId":"list_events","summary":"List account events (charge, subscription, customer and other changes) newest first with type and time; filter by event ","description":"List account events (charge, subscription, customer and other changes) newest first with type and time; filter by event type, resource type and resource id. Use for \"Which PAY.JP charge.failed events happened recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only events of this type, for example charge.succeeded or charge.failed.","title":"Type"},"object":{"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}],"default":null,"description":"Only events about this resource kind, for example charge or customer.","title":"Object"},"resource_id":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only events about this resource id.","title":"Resource Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many objects to return (1 to 100, default 10).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many objects to skip, for paging.","title":"Offset"},"since":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or after this Unix timestamp (seconds).","title":"Since"},"until":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only objects created at or before this Unix timestamp (seconds).","title":"Until"}},"title":"list_eventsArguments","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}}}}