rejected-events

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

GET /v1/rejected-events #

Events refused by POST /v1/events, newest first

Every event POST /v1/events (or the corrections route) answered rejected is kept here, so a developer can see later what went wrong: the error_code and the API's error_message, the meter code and customer id as sent, the event time and the idempotency key. The properties and the quantity are never kept. The log of a tenant (an environment) holds the last 14 days and at most 10 000 rows, the oldest dropped first. A row is written just after the answer, best effort: it can be a moment late, and a rejection is missing when the database could not take the write or a burst of rejections outran the writer. Needs the usage:read permission.

Parameters

NameInTypeDescription
error_codequerystringOne of the error codes of `POST /v1/events`
meterquerystringA meter code, as sent
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListRejectedEventsResponse
400Error envelopeError
Example response
{
  "events": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "error_code": "string",
      "error_message": "string",
      "meter_code": "string",
      "customer_external_id": "string",
      "event_time": "2026-11-03T10:15:00Z",
      "received_time": "2026-11-03T10:15:00Z",
      "idempotency_key": "string"
    }
  ],
  "next_page_token": "string"
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/rejected-events \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/rejected-events/summary #

Rejected events of the last 24 hours, by error code and by hour

Counts from the same log as listRejectedEvents. Only the rejected side is here: the number of accepted events per hour is not kept anywhere cheap to read, so there is no accepted-versus-rejected ratio. Needs the usage:read permission.

Responses

StatusMeaningBody
200OKRejectedEventSummary
Example response
{
  "total": 1,
  "by_code": [
    {
      "error_code": "string",
      "count": 1
    }
  ],
  "hourly": [
    {
      "hour": "2026-11-03T10:15:00Z",
      "rejected": 1
    }
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/rejected-events/summary \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

Models

Error

FieldTypeDescription
error requiredobject

ListRejectedEventsResponse

FieldTypeDescription
events requiredarray of RejectedEvent
next_page_token requiredstringEmpty on the last page

RejectedEvent

FieldTypeDescription
id requiredstring · uuid
error_code requiredstringOne of the error codes of POST /v1/events
error_message requiredstringThe API's own message, in English
meter_code requiredstringAs sent; may name a meter that does not exist
customer_external_id requiredstringAs sent; may name a customer that does not exist
event_time requiredstring · date-timeNull when the event carried no time
received_time requiredstring · date-time
idempotency_key requiredstringAs sent; empty when the event had none

RejectedEventSummary

FieldTypeDescription
total requiredintegerRejected events of the last 24 hours
by_code requiredarray of objectMost frequent first
hourly requiredarray of object24 buckets, oldest first; the last one is the current hour