Webhooks (Callbacks)

ZuriPay uses webhooks (called "callbacks" in the API) to notify your server of payment events in real time. When a transaction status changes, ZuriPay sends an HTTP POST request to your configured callback URL.


POST/v1/callback

Create callback

Register a new callback URL to receive payment event notifications.

Required attributes

  • Name
    url
    Type
    string
    Description

    The HTTPS URL where ZuriPay will send event notifications.

  • Name
    events
    Type
    array
    Description

    List of event types to subscribe to (e.g., ["transaction.success", "transaction.failed"]).

Request

POST
/v1/callback
curl -X POST https://api.zuripay.app/v1/callback \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yoursite.com/webhooks/zuripay",
    "events": ["transaction.success", "transaction.failed"]
  }'

Response

{
  "result": "success",
  "message": "Callback created successfully."
}

GET/v1/callback/list

List callbacks

Retrieve all registered callback URLs for your account.

Request

GET
/v1/callback/list
curl https://api.zuripay.app/v1/callback/list \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "callbacks": [
    {
      "id": 1,
      "url": "https://yoursite.com/webhooks/zuripay",
      "events": ["transaction.success", "transaction.failed"],
      "is_active": true,
      "dateCreated": "2025-01-15T10:30:00Z"
    }
  ]
}

GET/v1/callback/:id

Fetch callback

Retrieve details of a specific callback by its ID.

Request

GET
/v1/callback/1
curl https://api.zuripay.app/v1/callback/1 \
  -H "Authorization: Bearer sk_live_your_api_key"

PUT/v1/callback/:id

Update callback

Update an existing callback URL or its subscribed events.

Optional attributes

  • Name
    url
    Type
    string
    Description

    New HTTPS callback URL.

  • Name
    events
    Type
    array
    Description

    Updated list of event types.

  • Name
    is_active
    Type
    boolean
    Description

    Enable or disable the callback.

Request

PUT
/v1/callback/1
curl -X PUT https://api.zuripay.app/v1/callback/1 \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yoursite.com/webhooks/zuripay-v2",
    "is_active": true
  }'

Response

{
  "result": "success",
  "message": "Callback updated successfully."
}

DELETE/v1/callback/:id

Delete callback

Remove a callback URL from your account.

Request

DELETE
/v1/callback/1
curl -X DELETE https://api.zuripay.app/v1/callback/1 \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "message": "Callback deleted successfully."
}

Was this page helpful?