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)
- Log in to DigetPay Merchant Portal.
- Navigate to Settings → Webhooks.
- Add your HTTPS endpoint URL.
- 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
}
}
}{
"failed": {
"status": 400,
"body": {
"statusCode": 400,
"message": "Invalid webhook URL",
"error": "Bad Request"
}
}
}{
"failed_unauthorized": {
"status": 401,
"body": {
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}
}
}Critical: Store
secretimmediately 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
| Action | Method | Path |
|---|---|---|
| List webhooks | GET | /merchant/account/webhooks |
| Create webhook | POST | /merchant/account/webhooks |
| Update webhook | PUT | /merchant/account/webhooks/{id} |
| Delete webhook | DELETE | /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.
Updated about 2 months ago
