Events & Webhooks API
ClapPay sends webhook notifications when events happen in your account. Subscribe to events by creating webhook endpoints and selecting the event types you want to receive.
Endpoints
GET
/api/v1/payment/webhook-events/List all webhook events with pagination. Filter by type, status, created_after.
GET
/api/v1/payment/webhook-events/{id}/Get event detail including full payload.
POST
/api/v1/payment/webhook-events/{id}/retry/Retry delivery of a failed event.
GET
/api/v1/payment/webhook-event-types/List all available event types and their descriptions.
GET
/api/v1/payment/webhook-endpoints/List webhook endpoints.
POST
/api/v1/payment/webhook-endpoints/Create a webhook endpoint. Body: { url, events, description? }
POST
/api/v1/payment/webhook-endpoints/{id}/test/Send a test event to verify your endpoint.
POST
/api/v1/payment/webhook-endpoints/{id}/rotate-secret/Rotate the endpoint signing secret.
Event Types
Payments
payment_intent.createdpayment_intent.succeededpayment_intent.payment_failedpayment_intent.canceledcharge.succeededcharge.failedcharge.refundedSubscriptions
subscription.createdsubscription.updatedsubscription.deletedsubscription.trial_will_endsubscription.past_duesubscription.resumedInvoices
invoice.createdinvoice.finalizedinvoice.paidinvoice.payment_failedinvoice.voidedinvoice.sentCustomers
customer.createdcustomer.updatedcustomer.deletedDisputes
dispute.createddispute.updateddispute.closeddispute.funds_withdrawndispute.funds_reinstatedProducts & Prices
product.createdproduct.updatedproduct.deletedprice.createdprice.updatedprice.deletedCheckout
checkout.session.completedcheckout.session.expiredcheckout.session.async_payment_succeededCredit Notes
credit_note.createdcredit_note.voidedDiscounts
coupon.createdcoupon.updatedcoupon.deletedEvent Object
{
"id": "evt_1234567890",
"type": "payment_intent.succeeded",
"created": "2026-02-16T12:00:00Z",
"livemode": true,
"data": {
"object": {
"id": "pi_xxx",
"amount": 2999,
"currency": "usd",
"status": "succeeded",
"customer": "cus_xxx"
}
},
"request": {
"id": "req_xxx",
"idempotency_key": null
}
}Signature Verification
Verify webhook signatures using the ClapPay-Signature header and your endpoint secret key.
import hmac
import hashlib
def verify_signature(payload, signature, secret):
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)