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#
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier with evt_ prefix |
object | string | Always "event" |
type | string | Event type (e.g., payment_intent.succeeded) |
data | object | Event data |
data.object | object | The full API object related to the event |
api_version | string | API version used to render this event |
request | object | Information about the API request that triggered the event |
request.id | string | Request ID |
request.idempotency_key | string | Idempotency key used |
pending_webhooks | integer | Number of webhooks yet to be delivered |
livemode | boolean | Live or test mode |
created | timestamp | Time 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
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by event type |
types | array | Filter by multiple event types |
created[gte] | timestamp | Created on or after |
created[lte] | timestamp | Created on or before |
delivery_success | boolean | Filter by delivery status |
limit | integer | Number 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#
| Product | Events |
|---|---|
| Tenant Verification | verification_session.*, verification_report.*, document_upload.*, identity_check.* |
| Tenant Scoring | score_request.*, score_report.* |
| Invoicing | invoice.*, credit_note.* |
| Payments Collection | payment_intent.*, charge.*, payment_method.*, mandate.*, bank_authorisation.*, dispute.* |
| Payments Payouts | payout.*, balance.* |
| Payments Guarantee | guarantee.*, claim.* |
| Debt Collection | collection_case.*, debt_payment.*, case_chat.*, case_file.* |