API Docs

Updating Callbacks

Security Note: Callbacks can only be managed using your Secret API Key, not your Public Key. This is for security purposes, as callbacks have access to sensitive event data.

You can update callback details including URL, description, subscribed events, and activation status. The response will provide confirmation of the update status.

Headers

  • Authorization: Bearer YOUR_SECRET_KEY - Your API secret key prefixed with "Bearer".
  • Content-Type: application/json - Specifies the format of the request body.

Path Parameters

  • callback_id: string (required) - The unique identifier for the callback you want to update.

Body Parameters

url

Optional - The updated URL where webhook notifications will be sent.

description

Optional - The updated description of the callback.

events

Optional - Updated comma-separated list of events to subscribe to (e.g., "payout.created,payout.updated").

is_active

Optional - Boolean value to activate or deactivate the callback.

Sample Request to Update a Callback

curl -X PUT "https://api.zuripay.app/v1/callback/update/93955f5a-9d21-48c7-bab7-cfac20cf426e" \
-H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://example.com/webhooks/payments/v2",
  "description": "Updated payment notification endpoint",
  "events": "payment.created,payment.updated,payment.completed,payment.failed",
  "is_active": true
}'

Sample Responses

{
    "result": "success",
    "id": "93955f5a-9d21-48c7-bab7-cfac20cf426e",
    "message": "Callback updated successfully."
}