Events#

Events represent things that happen in your CasaPay account. When an interesting event occurs, CasaPay creates a new Event object and sends it to your webhook endpoints.

The Event object#

AttributeTypeDescription
idstringUnique identifier with evt_ prefix
objectstringAlways "event"
typestringEvent type (e.g., payment_intent.succeeded)
dataobjectEvent data
data.objectobjectThe full API object related to the event
api_versionstringAPI version used to render this event
requestobjectInformation about the API request that triggered the event
request.idstringRequest ID
request.idempotency_keystringIdempotency key used
pending_webhooksintegerNumber of webhooks yet to be delivered
livemodebooleanLive or test mode
createdtimestampTime at which the object was created
{
  "id": "evt_1a2b3c4d",
  "object": "event",
  "type": "payment_intent.succeeded",
  "data": {
    "object": {
      "id": "pi_1a2b3c4d",
      "object": "payment_intent",
      "amount": 120000,
      "currency": "eur",
      "status": "succeeded"
    }
  },
  "api_version": "2025-01-15",
  "request": {
    "id": "req_abc123",
    "idempotency_key": null
  },
  "pending_webhooks": 1,
  "livemode": false,
  "created": 1706140800
}

Retrieve an Event#

GET /v1/events/:id

curl https://api.casapay.com/v1/events/evt_1a2b3c4d \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

List Events#

GET /v1/events

ParameterTypeDescription
typestringFilter by event type
typesarrayFilter by multiple event types
created[gte]timestampCreated on or after
created[lte]timestampCreated on or before
delivery_successbooleanFilter by delivery status
limitintegerNumber of objects (1–100)
curl "https://api.casapay.com/v1/events?type=payment_intent.succeeded&limit=25" \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

All Event Types#

ProductEvents
Tenant Verificationverification_session.*, verification_report.*, document_upload.*, identity_check.*
Tenant Scoringscore_request.*, score_report.*
Invoicinginvoice.*, credit_note.*
Payments Collectionpayment_intent.*, charge.*, payment_method.*, mandate.*, bank_authorisation.*, dispute.*
Payments Payoutspayout.*, balance.*
Payments Guaranteeguarantee.*, claim.*
Debt Collectioncollection_case.*, debt_payment.*, case_chat.*, case_file.*