Skip to main content
Glama
beel-es

BeeL MCP server

Official
by beel-es

beel_list_payment_events

Read-onlyIdempotent

Lists payment events for a company's payment connection, newest first, to audit charges that produced invoices and find those that did not.

Instructions

Lists the payment events received through the payment provider connection of a NIF (company), most recent first. Use it to audit the charges that produced an invoice and to find the ones that did not.

  • By default, every event is listed. Nothing is hidden: events the connection skipped, duplicates and disputes are all returned. Narrow the list with the filters below; what you do not filter, you get. Set charges_only=true to read the same events as one row per money movement instead.

  • Scope: events belong to the connection, not to the NIF directly. The {connection_id} segment picks one connection of the NIF in the path, and only the events of that connection are returned; an event of another NIF of the same account is never reachable from here.

  • Unknown connection: a {connection_id} that belongs to no connection of this NIF returns 404.

Endpoint: GET /v1/companies/{company_id}/payment-connections/{connection_id}/events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoFree-text search over the payer name and the provider identifiers of the charge (`pi_`, `ch_`, `cs_`, `evt_`). Case-insensitive, partial matches allowed. The payer email is deliberately not searchable.
toNoKeep only the events received at or before this instant.
fromNoKeep only the events received at or after this instant.
pageNoPage number, starting at 1. The response echoes it back as `pagination.current_page`.
limitNoHow many items to return per page. The response echoes it back as `pagination.items_per_page`.
statusNoKeep only the events in these processing states. Repeat the parameter to combine states; omit it, or send it empty (`status=`), for all of them.
company_idYesUnique identifier (UUID) of the company the events belong to — 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, so the existence of a company in another account is never disclosed.
event_kindNoKeep only the events of these kinds. Matches `event_kind`, never `event_type`: the kind is what the event is about, while `event_type` is the raw name the provider emitted (`payment_intent.succeeded`) and is not filterable. `UNKNOWN` keeps every event whose provider name we do not classify. Repeat the parameter to combine kinds. An empty value (`event_kind=`) is the same as omitting it.
max_amountNoKeep only the events whose `amount` is at or below this value.
min_amountNoKeep only the events whose `amount` is at or above this value.
charges_onlyNoReturn one row per money movement instead of one row per event. Today, when this parameter is omitted or `false`, every event is listed. **The default changes on 11 December 2026.** From that day, omitting this parameter reads the listing as `charges_only=true` — one row per money movement. Until then a request that omits it answers with `Deprecation`, `Sunset` and `Link` headers. Send the value you want explicitly, whichever it is, so the change of default cannot surprise you. See the [migration guide](https://docs.beel.es/changelog/payments-cleanup). A money movement is a sale, a failed payment, each refund and each dispute. The provider usually reports a single movement through several events. When this parameter is `true`, each movement is returned in at most two rows: its outcome and, when any of its events requires action, its incident. The outcome row stands for the events of the movement that require no action; the incident row stands for the events of the movement that require action, so an invoiced movement that still has something to resolve always shows it. Within each row, the event that produced an invoice comes first, then an event of a classified kind before an unclassified one, and then the most recent one. A sale and a failed payment of the same charge are two movements, and every refund and every dispute of a charge is a movement of its own; the opening and the closing of a dispute are the same movement. An event of an unclassified kind that requires action joins the incident row of the movement its identifier names: a charge joins its sale, a dispute joins that dispute, and a refund or a credit note joins that refund. An event whose identifier names no movement, or that carries no identifier at all, stays a row of its own and is never merged with another. Events that moved no money, such as a customer, a price or a product being created, are left out, except those that require action, which are always listed. Discarded events of a movement that is still listed through a live event are ignored: they are neither returned nor counted. A movement whose events are all discarded is returned as a single row, only when `include_discarded` is `true`, and counts once in `discarded`. Without other filters, the number of rows returned with `include_discarded=true` is therefore `total` plus `discarded`. The other filters narrow the rows returned and `pagination.total_items`, and nothing else. `counts` describes the whole connection in the view you asked for and disregards every other filter: with `charges_only=true`, its `total`, `discarded`, `needs_action` and `by_status` values count money movements rather than individual events, while its `ignored` and `failure_reasons` values keep counting events. A request that filters by `q` may therefore return a single row while `counts.total` still reports every movement of the connection.
needs_actionNo`true` keeps only the events still worth acting on; `false`, only the ones that are not. Omit it for both.
connection_idYesUnique identifier (UUID) of the payment connection the operation acts on, as returned by `GET /v1/companies/{company_id}/payment-connections`. A NIF can hold several connections of the same provider, so the provider slug alone does not name one. A connection of another NIF answers `404`, exactly like one that does not exist.
failure_reasonNoKeep only the events that did not complete for these reasons. Repeat the parameter to combine reasons. An empty value (`failure_reason=`) is the same as omitting it.
failure_categoryNoKeep only the events that did not complete for a cause in these categories. Repeat the parameter to combine categories. Events that completed carry no category and are therefore never kept by this filter. An empty value (`failure_category=`) is the same as omitting it.
include_discardedNoInclude the events you discarded. They are excluded by default; discarding is a decision about the list, not a state of the event.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.9.0
    • addedInput schema / $defs
      Added value: +{
      +  "PaymentEventFailureCategory": {
      +    "description": "High-level cause of an event that did not complete, so you can tell apart what you can fix\nfrom what you cannot.\n\n- `USER_CONFIGURATION`: your configuration stopped it (filters, missing series)\n- `PROVIDER_DATA`: the provider data was insufficient or inconsistent\n- `DOMAIN_RULE`: an invoicing rule forbade it — permanent, retrying changes nothing\n- `INFRASTRUCTURE`: a transient failure; retrying may work\n- `SYSTEM_ERROR`: a defect on our side\n",
      +    "enum": [
      +      "USER_CONFIGURATION",
      +      "PROVIDER_DATA",
      +      "DOMAIN_RULE",
      +      "INFRASTRUCTURE",
      +      "SYSTEM_ERROR"
      +    ],
      +    "type": "string"
      +  },
      +  "PaymentEventStatus": {
      +    "description": "Processing status of a payment event.\n\n- RECEIVED: queued, awaiting processing\n- PROCESSING: in flight\n- PROCESSED: invoice was created (`invoice_id` is set)\n- FAILED: processing failed (see failure_reason / failure_message)\n- SKIPPED: filtered out by user rules (see skip_reason)\n- MANUALLY_RESOLVED: operator marked it as resolved outside BeeL — terminal\n",
      +    "enum": [
      +      "RECEIVED",
      +      "PROCESSING",
      +      "PROCESSED",
      +      "FAILED",
      +      "SKIPPED",
      +      "MANUALLY_RESOLVED"
      +    ],
      +    "type": "string"
      +  },
      +  "PaymentEventType": {
      +    "description": "What a payment event is about, once the provider's own event name has been classified.\n\n- `PAYMENT_COMPLETED`: a charge went through\n- `PAYMENT_FAILED`: a charge was attempted and did not go through\n- `REFUND_COMPLETED`: money was returned (refund or credit note)\n- `DISPUTE_OPENED`: the payer disputed a charge\n- `DISPUTE_CLOSED`: a dispute was settled, in favour of either party\n- `UNKNOWN`: the provider event does not fall in any of the above\n",
      +    "enum": [
      +      "PAYMENT_COMPLETED",
      +      "PAYMENT_FAILED",
      +      "REFUND_COMPLETED",
      +      "DISPUTE_OPENED",
      +      "DISPUTE_CLOSED",
      +      "UNKNOWN"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / charges_only
      Added value: +{
      +  "default": false,
      +  "description": "Return one row per money movement instead of one row per event. Today, when this\nparameter is omitted or `false`, every event is listed.\n\n**The default changes on 11 December 2026.** From that day, omitting this parameter\nreads the listing as `charges_only=true` — one row per money movement. Until then a\nrequest that omits it answers with `Deprecation`, `Sunset` and `Link` headers. Send\nthe value you want explicitly, whichever it is, so the change of default cannot\nsurprise you. See the [migration guide](https://docs.beel.es/changelog/payments-cleanup).\n\nA money movement is a sale, a failed payment, each refund and each dispute. The\nprovider usually reports a single movement through several events. When this\nparameter is `true`, each movement is returned in at most two rows: its outcome and,\nwhen any of its events requires action, its incident. The outcome row stands for the\nevents of the movement that require no action; the incident row stands for the events\nof the movement that require action, so an invoiced movement that still has something\nto resolve always shows it. Within each row, the event that produced an invoice comes\nfirst, then an event of a classified kind before an unclassified one, and then the\nmost recent one. A sale and a failed payment of the same charge are two movements, and\nevery refund and every dispute of a charge is a movement of its own; the opening and\nthe closing of a dispute are the same movement.\n\nAn event of an unclassified kind that requires action joins the incident row of the\nmovement its identifier names: a charge joins its sale, a dispute joins that dispute,\nand a refund or a credit note joins that refund. An event whose identifier names no\nmovement, or that carries no identifier at all, stays a row of its own and is never\nmerged with another. Events that moved no money, such as a customer, a price or a\nproduct being created, are left out, except those that require action, which are\nalways listed.\n\nDiscarded events of a movement that is still listed through a live event are ignored: they are\nneither returned nor counted. A movement whose events are all discarded is returned as\na single row, only when `include_discarded` is `true`, and counts once in `discarded`.\nWithout other filters, the number of rows returned with `include_discarded=true` is\ntherefore `total` plus `discarded`.\n\nThe other filters narrow the rows returned and `pagination.total_items`, and nothing\nelse. `counts` describes the whole connection in the view you asked for and disregards\nevery other filter: with `charges_only=true`, its `total`, `discarded`, `needs_action`\nand `by_status` values count money movements rather than individual events, while its\n`ignored` and `failure_reasons` values keep counting events. A request that filters by\n`q` may therefore return a single row while `counts.total` still reports every movement\nof the connection.\n",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / connection_id
      Added value: +{
      +  "description": "Unique identifier (UUID) of the payment connection the operation acts on, as returned by `GET /v1/companies/{company_id}/payment-connections`. A NIF can hold several connections of the same provider, so the provider slug alone does not name one. A connection of another NIF answers `404`, exactly like one that does not exist.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / event_kind
      Added value: +{
      +  "description": "Keep only the events of these kinds. Matches `event_kind`, never `event_type`: the\nkind is what the event is about, while `event_type` is the raw name the provider\nemitted (`payment_intent.succeeded`) and is not filterable. `UNKNOWN` keeps every\nevent whose provider name we do not classify. Repeat the parameter to combine kinds.\nAn empty value (`event_kind=`) is the same as omitting it.\n",
      +  "items": {
      +    "$ref": "#/$defs/PaymentEventType"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / failure_category
      Added value: +{
      +  "description": "Keep only the events that did not complete for a cause in these categories. Repeat the\nparameter to combine categories. Events that completed carry no category and are\ntherefore never kept by this filter. An empty value (`failure_category=`) is the same\nas omitting it.\n",
      +  "items": {
      +    "$ref": "#/$defs/PaymentEventFailureCategory"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / failure_reason
      Added value: +{
      +  "description": "Keep only the events that did not complete for these reasons. Repeat the parameter to\ncombine reasons. An empty value (`failure_reason=`) is the same as omitting it.\n",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Keep only the events received at or after this instant.",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / include_discarded
      Added value: +{
      +  "default": false,
      +  "description": "Include the events you discarded. They are excluded by default; discarding is a\ndecision about the list, not a state of the event.\n",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_amount
      Added value: +{
      +  "description": "Keep only the events whose `amount` is at or below this value.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / min_amount
      Added value: +{
      +  "description": "Keep only the events whose `amount` is at or above this value.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / needs_action
      Added value: +{
      +  "description": "`true` keeps only the events still worth acting on; `false`, only the ones that are\nnot. Omit it for both.\n",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / provider
      Removed value: -{
      -  "description": "Payment provider slug in **lowercase**. Currently only `stripe` (Stripe Connect) is\noperative; `woocommerce` and `shopify` are reserved for future providers.\n",
      -  "enum": [
      -    "stripe"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "Free-text search over the payer name and the provider identifiers of the charge\n(`pi_`, `ch_`, `cs_`, `evt_`). Case-insensitive, partial matches allowed. The payer\nemail is deliberately not searchable.\n",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Keep only the events in these processing states. Repeat the parameter to combine\nstates; omit it, or send it empty (`status=`), for all of them.\n",
      +  "items": {
      +    "$ref": "#/$defs/PaymentEventStatus"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "Keep only the events received at or before this instant.",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "company_id",
      -  "provider"
      -]New value: +[
      +  "company_id",
      +  "connection_id"
      +]
  2. Changed2 schema fields changedv0.5.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / company_id / description
      Previous value: -"NIF (company) the events belong to. 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 NIF you do not reach answers `403`, and so does a NIF that does not exist, so the existence of a NIF in another account is never disclosed."New value: +"Unique identifier (UUID) of the company the events belong to — 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, so the existence of a company in another account is never disclosed."
  3. First observedv0.3.1

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations (which only cover readOnly/idempotent/openWorld/destructive): nothing is hidden by default, connection vs NIF reachability, a foreign connection_id yields 404, and the charges_only default change with Deprecation/Sunset headers on 11 Dec 2026. This is exactly the kind of context annotations cannot express.

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

Conciseness4/5

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

Four front-loaded bullets: what it lists, default breadth, scope, error behavior. Every sentence earns its place and the endpoint line is a useful anchor. Dense but not padded.

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

Completeness4/5

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

For a 16-param, connection-scoped list tool with 100% schema coverage and no output schema, the description covers scope, defaults and the 404 case well. It does not describe the returned event fields or pagination shape, which the schema only partially implies, leaving a small gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description steers the agent to the semantically tricky parameter: default full listing versus charges_only=true reading one row per money movement. It adds navigation value over the schema even though the deep charges_only mechanics are already spelled out in the schema.

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 specific verb and resource ('Lists the payment events received through the payment provider connection'), plus the sort order ('most recent first'). The scope bullet (events belong to the connection, not the NIF) cleanly separates it from sibling list tools such as beel_list_payment_connections and beel_get_payment_event.

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?

Gives explicit intent: 'Use it to audit the charges that produced an invoice and to find the ones that did not,' and explains the charges_only alternative view. It stops short of naming a different sibling tool or stating when-not to use this one, so it is clear context but not full routing guidance.

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

Deploy Server

Other Tools