Skip to main content
Glama

beel_initiate_payment_connection

Idempotent

Opens an authorization session so the holder of a company your account manages can connect a payment provider (stripe), and returns the authorization_url where they authorize it.

  • return_url: once the holder authorizes, BeeL's callback finalizes the connection and redirects back to the return_url of your portal, if you supplied one, with the parameters described under return_url.

  • When the connection appears: it is created only when the holder authorizes, so it does not appear in GET /v1/companies/{company_id}/payment-connections until then. It is sealed under the NIF in the path, so auto-invoicing issues under that NIF.

  • The NIF must be activated in the mode of your API key (beel_sk_test_* → Test, beel_sk_live_* → Live); otherwise the request answers 400 COMPANY_NOT_ACTIVATED_IN_ENVIRONMENT and no authorization_url is issued, because without activation there is no invoice series or tax configuration to invoice with. Test and Live activations are independent — a NIF activated in one mode still needs activating in the other.

  • One provider account, one NIF: a provider account (acct_...) can be connected to a single NIF across the whole platform. Authorizing the same provider account from a second NIF does not move it: the callback fails with OAUTH_ACCOUNT_CONNECTED_TO_OTHER_COMPANY, and the existing connection keeps invoicing under the NIF it was sealed with. To move it, first DELETE /v1/companies/{company_id}/payment-connections/{provider} on the NIF that holds it, then open a new authorization on the NIF you want it under.

Endpoint: POST /v1/companies/{company_id}/payment-connections/authorizations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
company_idYesUnique identifier (UUID) of the company the authorization is opened for — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist.
idempotency_keyNoOptional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only provide coarse signals (non-read-only, idempotent, open-world), so the description carries the behavioral burden and exceeds it. It discloses that no connection is created until authorization, that the connection is sealed under the NIF, that activation mode matters with a specific error code, and the one-provider-per-NIF side effect with its callback failure mode.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence states the core purpose immediately, and each bullet adds a distinct non-obvious behavioral fact: callback redirect behavior, delayed connection creation, NIF activation mode, and the one-NIF constraint. It is long, but every sentence earns its place for a complex OAuth-style flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the purpose, prerequisites, side effects, error conditions, callback behavior, and the returned `authorization_url`. With no output schema present, the description provides enough information for an agent to invoke the tool correctly and interpret the important outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents the key parameters in depth—`provider` values, `return_url` constraints and callback parameters, `company_id` semantics, and idempotency behavior. The description adds behavioral context around the NIF and authorization lifecycle but does not need to restate parameter details; the schema is doing the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise action: opens an authorization session so the holder of a managed company can connect a payment provider, and names the returned artifact (`authorization_url`). It clearly sits apart from siblings like `beel_list_payment_connections` and `beel_disconnect_payment_connection` by being the initiation step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides strong conditions for correct use: the NIF must be activated in the API key's mode, and a provider account can only be attached to one NIF—including how to move it by deleting the existing connection first. It does not explicitly name an alternative tool, but the prerequisites and constraints make the when-to-use decision unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation4/5

Each tool targets a distinct resource-action pair, and the detailed descriptions separate lookalikes like create_invoice, create_invoice_derivation, and create_invoice_delivery. The sheer number of tools makes selection harder, and a few same-verb clusters still demand close reading, but there are no true functional duplicates.

Naming Consistency4/5

Names follow a consistent beel_verb_noun pattern with clear CRUD verbs (create/get/list/patch/delete) plus domain verbs like issue, void, send, and retry. Minor inconsistencies remain: PATCH operations are sometimes patch_*, sometimes update_* or set_*, and there is an outlier put_member_grant.

Tool Count1/5

121 tools is far beyond the 50+ threshold and is an extreme mismatch for a tool surface, however broad the underlying API. Even with clean naming, this many tools forces agents to repeatedly scan a massive list and should be consolidated or split into focused servers.

Completeness4/5

The surface covers most lifecycles exhaustively: companies, customers, invoices, products, series, recurring invoices, webhooks, members, payment events, and tax configuration. A few sub-flows have dead ends — representation generation/download/cancel exist but no submit tool, and logo deletion exists without an upload tool — so it falls just short of full coverage.