CompanyPaymentEvents

List the payment events of a company's connection

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.
get/v1/companies/{company_id}/payment-connections/{connection_id}/events

Request

  • Base URL: https://app.beel.es/api
  • URL: https://app.beel.es/api/v1/companies/{company_id}/payment-connections/{connection_id}/events
  • Auth: HTTP bearer

Query parameters

pageinteger

Page number, starting at 1. The response echoes it back as pagination.current_page.

limitinteger

How many items to return per page. The response echoes it back as pagination.items_per_page.

statusPaymentEventStatus[]

Keep only the events in these processing states. Repeat the parameter to combine states; omit it, or send it empty (status=), for all of them.

failure_reasonstring[]

Keep 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_categoryPaymentEventFailureCategory[]

Keep 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.

event_kindPaymentEventType[]

Keep 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.

min_amountnumber

Keep only the events whose amount is at or above this value.

max_amountnumber

Keep only the events whose amount is at or below this value.

needs_actionboolean

true keeps only the events still worth acting on; false, only the ones that are not. Omit it for both.

fromstring date-time

Keep only the events received at or after this instant.

tostring date-time

Keep only the events received at or before this instant.

qstring

Free-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.

include_discardedboolean

Include the events you discarded. They are excluded by default; discarding is a decision about the list, not a state of the event.

charges_onlyboolean

Return 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.

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.

Response

Payment events of the connection

successboolean

Example response

{
  "data": {
    "events": [
      {
        "provider": "stripe",
        "event_type": "payment_intent.succeeded",
        "external_event_id": "evt_1234567890",
        "external_payment_id": "pi_1234567890",
        "source_object_id": "in_1234567890",
        "currency": "EUR",
        "amount": 150,
        "invoice_number": "2026/0042",
        "failure_reason": "MISSING_DEFAULT_SERIES",
        "payment_method": "BANK_TRANSFER"
      }
    ],
    "pagination": {
      "current_page": 1,
      "total_pages": 5,
      "total_items": 87,
      "items_per_page": 20
    },
    "counts": {
      "total": 183,
      "discarded": 7,
      "needs_action": 12,
      "ignored": 31,
      "by_status": {
        "PROCESSED": 148,
        "SKIPPED": 31,
        "FAILED": 4
      },
      "by_failure_reason": {
        "EVENT_IGNORED_BY_DESIGN": 25,
        "MISSING_DEFAULT_SERIES": 4
      },
      "failure_reasons": [
        {
          "code": "MISSING_DEFAULT_SERIES",
          "label": "No hay serie predeterminada configurada",
          "count": 4
        }
      ]
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.