Configure Webhooks

Create, update, and delete payment notification webhooks.

Configure where DigetPay sends payment notifications (success, failure, capture, refund) for your merchant account. After configuration, implement your endpoint using Receiving Webhooks.

Webhooks are the recommended way to confirm payments in production. Do not rely on customer redirect URLs alone.

Merchant Portal (UI)

  1. Log in to DigetPay Merchant Portal.
  2. Navigate to Settings → Webhooks.
  3. Add your HTTPS endpoint URL.
  4. Save and verify with a test event.

Important: Your webhook URL must be HTTPS and publicly reachable from the internet.

Sequence — create webhook

sequenceDiagram
    autonumber
    participant Merchant as Merchant Portal / API Client
    participant DigetPay as DigetPay Portal API
    participant Store as DigetPay Config

    Merchant->>DigetPay: POST /merchant/account/webhooks<br/>{ url, events[], active }
    DigetPay->>Store: Persist webhook config
    DigetPay-->>Merchant: 201 { id, url, secret, events, active }
    Note over Merchant: Store webhook signing secret securely

Create webhook — request payload

{
  "url": "https://yourstore.com/webhooks/digetpay",
  "events": ["sale.approved", "refund.completed"],
  "active": true
}

Create webhook — response

{
  "success": {
    "status": 201,
    "body": {
      "id": "wh_abc123",
      "url": "https://yourstore.com/webhooks/digetpay",
      "secret": "whsec_shown_once",
      "active": true
    }
  }
}

Critical: Store secret immediately when shown. It is displayed once and cannot be retrieved later.

Sequence — update webhook

sequenceDiagram
    autonumber
    participant Merchant as Merchant Portal
    participant DigetPay as DigetPay Portal API

    Merchant->>DigetPay: PUT /merchant/account/webhooks/{webhookId}<br/>{ url?, events?, active? }
    DigetPay-->>Merchant: 200 updated webhook

Update webhook — request payload

{
  "url": "https://yourstore.com/webhooks/digetpay-v2",
  "active": true
}

Sequence — delete webhook

sequenceDiagram
    autonumber
    participant Merchant as Merchant Portal
    participant DigetPay as DigetPay Portal API

    Merchant->>DigetPay: DELETE /merchant/account/webhooks/{webhookId}
    DigetPay-->>Merchant: 204 No Content

Important: Deleting a webhook stops all payment notifications to that URL. Update your integration before deleting production webhooks.

Callback URL (S2S integrations)

For server-to-server flows, DigetPay forwards gateway notifications to your merchant callback URL:

{
  "method": "POST",
  "url": "https://yourstore.com/webhooks/digetpay",
  "contentType": "application/json"
}

DigetPay also receives gateway events at:

{
  "method": "POST",
  "path": "/v1/payment/s2s/callback/{merchantId}"
}

See Receiving Webhooks for payload handling.

Portal API endpoints

ActionMethodPath
List webhooksGET/merchant/account/webhooks
Create webhookPOST/merchant/account/webhooks
Update webhookPUT/merchant/account/webhooks/{id}
Delete webhookDELETE/merchant/account/webhooks/{id}

Portal API access requires Merchant Portal Bearer token. Contact DigetPay integration support to enable programmatic webhook management.

Best practice: Register separate webhook URLs for staging and production environments.

API Reference →


Did this page help you?