NewProvince is only required for addresses in Spain
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
Payment Events

List the payment events of a company's connection

Scopepayment-connections:read

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
AuthorizationBearer <token>

Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key short of the scope an operation needs is answered 403. The scope an operation requires is shown next to its title, and the full catalogue lives in the Scopes reference.

Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.

In: header

Path Parameters

company_idstring

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.

Formatuuid
connection_idstring

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.

Formatuuid

Query Parameters

page?integer

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

Default1
Range1 <= value
limit?integer

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

Default20
Range1 <= value <= 100
status?array<PaymentEventStatus>

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_reason?array<string>

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_category?array<PaymentEventFailureCategory>

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_kind?array<PaymentEventType>

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_amount?number

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

Range0 <= value
max_amount?number

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

Range0 <= value
needs_action?boolean

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

from?string

Keep only the events received at or after this instant.

Formatdate-time
to?string

Keep only the events received at or before this instant.

Formatdate-time
q?string

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.

Length1 <= length <= 200
include_discarded?boolean

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

Defaultfalse
charges_only?boolean

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.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.beel.es/api/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/payment-connections/497f6eca-6276-4993-bfeb-53cbbbba6f08/events"
{
  "success": true,
  "data": {
    "events": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "provider": "stripe",
        "event_type": "payment_intent.succeeded",
        "event_kind": "PAYMENT_COMPLETED",
        "external_event_id": "evt_1234567890",
        "external_payment_id": "pi_1234567890",
        "source_object_id": "in_1234567890",
        "currency": "EUR",
        "amount": 150,
        "fee_amount": 0,
        "net_amount": 0,
        "category": "DIRECT_PAYMENT",
        "money_returned": true,
        "customer_email": "string",
        "customer_name": "string",
        "status": "RECEIVED",
        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",
        "invoice_number": "2026/0042",
        "failure_category": "USER_CONFIGURATION",
        "failure_reason": "MISSING_DEFAULT_SERIES",
        "failure_message": "string",
        "needs_action": true,
        "draft_available": true,
        "retry_available": true,
        "discard_available": true,
        "retry_count": 0,
        "received_at": "2019-08-24T14:15:22Z",
        "processed_at": "2019-08-24T14:15:22Z",
        "description": "string",
        "payment_method": "CARD",
        "discarded": true,
        "discarded_at": "2019-08-24T14:15:22Z"
      }
    ],
    "pagination": {
      "current_page": 1,
      "total_pages": 5,
      "total_items": 87,
      "items_per_page": 20,
      "has_next": true,
      "has_previous": true
    },
    "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"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required to access this resource"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The provided data is not valid",
    "details": {
      "field": "specific error message"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  },
  "type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
  "title": "INVOICE_NO_LINES",
  "detail": "The invoice must have at least one line",
  "instance": "/v1/invoices/abc-123"
}
{
  "success": false,
  "error": {
    "code": "CONNECTION_NOT_FOUND",
    "message": "Payment connection not found"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The provided data is not valid",
    "details": {
      "field": "specific error message"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  },
  "type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
  "title": "INVOICE_NO_LINES",
  "detail": "The invoice must have at least one line",
  "instance": "/v1/invoices/abc-123"
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again in 60 seconds."
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "Unsupported media type: text/plain. Supported: application/json"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}