API Reference · Platform
Webhook Endpoints
HTTPS webhook listeners, signing secrets and deliveries. Today these are managed in the dashboard (Developers, Webhooks), where you can also send a test event and replay a delivery.
The webhook_endpoint object
Represents a webhook_endpoint entity in the rafiqPay system.
| Field | Type & Flags | Description |
|---|---|---|
| id | string | Endpoint ID (we_...). |
| url | string | HTTPS destination URL. |
| apiVersion | string | Pinned dated API version. |
Example webhook_endpoint JSON
webhook_endpoint example payload
{
"id": "we_01",
"url": "https://kanzu.ng/webhooks/rafiqpay",
"apiVersion": "2026-10-01",
"enabledEvents": [
"charge.succeeded"
]
}Endpoints & Operations
POST/v1/webhook-endpointsProposed
Create a webhook endpoint
Registers a new HTTPS webhook listener.
Request Example
POST /v1/webhook-endpoints
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/webhook-endpoints" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_create-webhook-endpoint_01" \
-H "Content-Type: application/json" \
-d '{
"url": "https://kanzu.ng/webhooks/rafiqpay",
"enabledEvents": [
"charge.succeeded",
"transfer.succeeded"
]
}'Response (200 OK)
Response payload
{
"id": "we_01",
"secret": "whsec_kanzu_99182736"
}GET/v1/webhook-endpoints/:idProposed
Retrieve a webhook endpoint
Retrieves a webhook endpoint.
Request Example
GET /v1/webhook-endpoints/:id
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/webhook-endpoints/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"id": "we_01"
}PATCH/v1/webhook-endpoints/:idProposed
Update a webhook endpoint
Updates URL or subscribed event list.
Request Example
PATCH /v1/webhook-endpoints/:id
cURL · v1
curl -X PATCH "https://api.rafiqpay.net/v1/webhook-endpoints/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Content-Type: application/json" \
-d '{
"enabledEvents": [
"*"
]
}'Response (200 OK)
Response payload
{
"id": "we_01"
}DELETE/v1/webhook-endpoints/:idProposed
Delete a webhook endpoint
Deletes a webhook endpoint.
Request Example
DELETE /v1/webhook-endpoints/:id
cURL · v1
curl -X DELETE "https://api.rafiqpay.net/v1/webhook-endpoints/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"id": "we_01",
"deleted": true
}POST/v1/webhook-endpoints/:id/roll-secretProposed
Roll the signing secret
Rolls the HMAC signing secret.
Request Example
POST /v1/webhook-endpoints/:id/roll-secret
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/webhook-endpoints/:id/roll-secret" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_roll-webhook-secret_01" \
-H "Content-Type: application/json" \
-d '{
"expireOldAfterHours": 24
}'Response (200 OK)
Response payload
{
"id": "we_01",
"secret": "whsec_new_88172"
}POST/v1/webhook-endpoints/:id/testProposed
Send a test event
Dispatches a synthetic webhook.test event.
Request Example
POST /v1/webhook-endpoints/:id/test
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/webhook-endpoints/:id/test" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_test-webhook-endpoint_01"Response (200 OK)
Response payload
{
"deliveryId": "whd_01",
"status": "delivered"
}GET/v1/webhook-deliveriesProposed
List deliveries
Lists webhook delivery attempts and HTTP status codes.
Request Example
GET /v1/webhook-deliveries
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/webhook-deliveries" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"object": "list",
"data": [],
"hasMore": false,
"nextCursor": null
}POST/v1/webhook-deliveries/:id/replayProposed
Replay a delivery
Re-queues a failed or dead-lettered webhook delivery.
Request Example
POST /v1/webhook-deliveries/:id/replay
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/webhook-deliveries/:id/replay" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_replay-webhook-delivery_01"Response (200 OK)
Response payload
{
"id": "whd_01",
"status": "requeued"
}Related Webhook Events
These events are dispatched to your webhook endpoints when actions occur on this resource: