API Docs
Fetching 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 fetch detailed information about a specific callback using its ID. The response will provide comprehensive details about the callback including its URL, subscribed events, and 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 fetch.
Sample Request to Fetch a Callback
curl -X GET "https://api.zuripay.app/v1/callback/fetch/93955f5a-9d21-48c7-bab7-cfac20cf426e" \ -H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \ -H "Content-Type: application/json"
Response Parameters
- result:
string
- Indicates whether the request was successful ("success") or not ("error"). - callback:
object
- Contains the details of the fetched callback with the following properties:- id:
string
- Unique identifier for the callback. - url:
string
- The URL where webhook notifications are sent. - description:
string
- Description of the callback. - events:
string
- List of events the callback is subscribed to. - is_active:
boolean
- Whether the callback is active. - failure_count:
number
- Number of consecutive delivery failures. - last_triggered:
string
- Timestamp of when the callback was last triggered. - date_created:
string
- Timestamp of when the callback was created. - date_updated:
string
- Timestamp of when the callback was last updated.
- id:
Sample Responses
{ "result": "success", "callback": { "id": "93955f5a-9d21-48c7-bab7-cfac20cf426e", "url": "https://example.com/webhooks/payments", "description": "Payment notification endpoint", "events": ["payment.created", "payment.updated", "payment.completed"], "is_active": true, "failure_count": 0, "last_triggered": "2023-03-15T09:30:22Z", "date_created": "2023-01-15T14:30:45Z", "date_updated": "2023-02-10T16:45:12Z" } }