Webhooks

We notify you instantly of every change. Signed, retried, and in order.

POST/v1/webhook-endpoints
curl "$CAIBO_API/v1/webhook-endpoints" \
  -H "Authorization: Bearer $CAIBO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://tu-empresa.com/webhooks/caibo",
    "description": "Production",
    "event_types": ["payin.completed", "payout.completed", "payout.failed"]
  }'
  • url: https, public, on port 443.
  • event_types: the types you want to receive. Empty or omitted: all of them.
  • The response includes secret (whsec_…) only once. If you lose it, rotate it.
  • Up to 10 webhooks per account and per environment.

What you receive

POST /webhooks/caibo HTTP/1.1
Content-Type: application/json
User-Agent: psp-webhooks/1 (live)
Psp-Signature: t=1790769600,v1=c0c9eaafdea23b0f8c992b380b286917c6459b0729b2496b8452fa695215e6b8
Psp-Event-Id: evt_01m3sgb02af7nb0jf73vwv2sd5
Psp-Delivery-Id: whd_01m3sgb03a...
Psp-Delivery-Attempt: 1
{
  "id": "evt_01m3sgb02af7nb0jf73vwv2sd5",
  "type": "payout.completed",
  "schema_version": 1,
  "occurred_at": "2026-10-18T14:00:41.126938Z",
  "livemode": true,
  "data": { "id": "pout_01m3sgb02af7nb0jf73vwv2sd4", "status": "completed" }
}

data is the full resource, in the same shape the API returns. See Events.

How to respond

Verify the signature

Using the body exactly as received, before parsing it. See Signatures.

Respond 2xx right away

You have 10 seconds. Store the event and process it later, in a queue. The body of your response is ignored. A redirect (3xx) counts as a failure.

Discard duplicates

Delivery is "at least once": the same event can arrive twice. Use Psp-Event-Id (the event's id) to avoid processing it twice.

Retries

If you don't respond 2xx in time, we retry up to 10 times over about 23 hours:

AttemptWait beforeAttemptWait before
230 s72 h
32 min84 h
410 min98 h
530 min108 h
61 h

Each wait varies by ±20%. After 10 consecutive failures, the webhook moves to failing and we send it a test delivery every 15 minutes; the first one that succeeds returns it to active. No event is ever lost: it's always in GET /v1/events.

Ordering: one delivery at a time per webhook, and events for the same resource arrive in order.

Tools

POST/v1/webhook-endpoints/{id}/pingSends a test webhook.ping (up to 5 per minute).
GET/v1/webhook-endpoints/{id}/deliveriesThe delivery history, with status and error.
POST/v1/events/{id}/redeliverResends an event to all your webhooks, or only to endpoint_id.
PATCH/v1/webhook-endpoints/{id}Changes url, description, event_types, or pauses with active: false.

Rotate the secret

POST/v1/webhook-endpoints/{id}/rotate-secret

Returns a new secret. For 24 hours we sign with both (the new one first), so you can update your server without missing notifications. previous_secret_expires_at tells you when the old one stops working.

Sur cette page