Webhook Service
Integrating the webhook service enables end users to receive notifications and updates regarding their account activity, transactions, security alerts, and other pertinent information. This integration ensures that users are promptly informed about important events related to their accounts.
📥 Get All Webhooks
Returns a list of all webhooks associated with a program.
- Endpoint
GET {{baseUrl}}/getallwebhooks
Description
This API retrieves all webhook events configured for a program, including the event name, description, and program code.
📩 Request Headers
x-api-key string required
Content-Type string required
application/json🔍 Query Parameters
program_code string required
Request Example
- cURL
curl --location --request GET \
--url '{{baseUrl}}/getallwebhooks?program_code={{Shared ProductID}}' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
Response Example
- 200: Success
- 400: Error
{
"data": [
{
"event_description": "Card Creation",
"event_name": "card_create",
"program_code": "program-code"
},
{
"event_description": "Card Activated",
"event_name": "card_activate",
"program_code": "program-code"
},
{
"event_description": "Card Status",
"event_name": "card_status",
"program_code": "program-code"
},
{
"event_description": "Card Configuration",
"event_name": "card_configuration",
"program_code": "program-code"
},
{
"event_description": "Card Enrollement in 3DS",
"event_name": "card_enroll3DS",
"program_code": "program-code"
},
{
"event_description": "3DS Method Update",
"event_name": "card_update3DSmethod",
"program_code": "program-code"
},
{
"event_description": "Creation of Cardholder",
"event_name": "cardholder_create",
"program_code": "program-code"
},
{
"event_description": "Updation of Cardholder",
"event_name": "cardholder_update",
"program_code": "program-code"
},
{
"event_description": "Creation of Wallet",
"event_name": "wallet_create",
"program_code": "program-code"
},
{
"event_description": "Peer to Peer Transfer",
"event_name": "p2p_transfer",
"program_code": "program-code"
},
{
"event_description": "Master to Peer Transfer",
"event_name": "m2p_transfer",
"program_code": "program-code"
},
{
"event_description": "Kyc Completed",
"event_name": "kyc_complete",
"program_code": "program-code"
},
{
"event_description": "RFI Responded",
"event_name": "kyc_rfi_responded",
"program_code": "program-code"
},
],
"status": "success"
}
{
"code": 400,
"message": "Error Message",
"status": "error"
}
📨 Subscribe Webhook
Subscribe to a webhook for a specific event.
- Endpoint
POST {{baseUrl}}/api/subscribe
Description
This API creates a new webhook subscription for a specific event, allowing your system to receive real-time notifications whenever that event occurs.
📩 Request Headers
x-api-key string required
Content-Type string required
application/json📦 Body Parameters
event_name string required
subscription_type string required
w for webhook or n for notification )agent_code string required
subagent_code string required
program_code string required
company_code string required
created_by string required
webhook_url string conditional
sender_email string conditional
x-api-key string conditional
⚠️ Important Note on subscription_type
subscription_type: "w" (Webhook)- You must provide these fields in request body:
webhook_urlx-api-keysender_emailis not required in the request body.
subscription_type: "n" (Email Notification)- You do not need to provide these fields in request body:
webhook_urlx-api-keyProvide
sender_emailonly if your email ID has been whitelisted by HashDT Support. Until then, all email notifications will be sent from HashDT’s default system email.
If you want notification emails to be sent from your own email address instead of HashDT’s generic email, you must contact HashDT Customer Support to whitelist your email ID.
Request Example for subscription_type: "w"
curl --location --request POST \
--url '{{baseUrl}}/api/subscribe' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
--data '{
"event_name": "{{event_name}}",
"subscription_type": "w",
"agent_code": "{{Shared Agent Code}}",
"subagent_code": "{{Shared Sub-Agent Code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"created_by": "Test",
"webhook_url": "{{webhook_url}}",
"x_api_key": "{{Shared X-API key}}"
}'
Request Example for subscription_type: "n"
curl --location --request POST \
--url '{{baseUrl}}/api/subscribe' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
--data '{
"event_name": "{{event_name}}",
"subscription_type": "n",
"agent_code": "{{Shared Agent Code}}",
"subagent_code": "{{Shared Sub-Agent Code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"created_by": "Test"
}'
Response Example
- 200: Success
- 400: Error
{
{
"message": "Webhook successfully subscribed",
"status": "SUCCESS"
}
}
{
"code": 400,
"message": "Error Message",
"status": "error"
}
📥 Retrieve Subscribed Webhook
Retrieves the details of all subscribed webhooks for a specific program.
- Endpoint
POST {{baseUrl}}/api/subscribedwebhook
Description
This API retrieves all webhook subscriptions for a program, including event names, webhook URLs, API keys, and audit details.
📩 Request Headers
x-api-key string required
Content-Type string required
application/json📦 Body Parameters
agent_code string required
subagent_code string required
🔍 Query Parameters
program_code string required
Request Example
- cURL
curl --location --request POST \
--url '{{baseUrl}}/api/subscribedwebhook?program_code={{Shared ProductID}}' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
--data '{
"agent_code":"{{Shared Agent Code}}",
"subagent_code":"{{Shared Sub-Agent Code}}"
}'
Response Example
- 200: Success
- 400: Error
[
{
"agent_code": "agent-code",
"company_code": "company-code",
"created_by": "Pabitra",
"created_time": "Thu, 07 Aug 2025 09:34:19 GMT",
"event_name": "account.submitted",
"program_code": "program-code",
"sl_no": 1,
"subagent_code": "sub-agent-code",
"subscription_type": "n",
"updated_by": null,
"updated_time": "Thu, 07 Aug 2025 09:34:19 GMT",
"webhook_url": "test",
"x_api_key": "x-api-key"
},
{
"agent_code": "agent-code",
"company_code": "company-code",
"created_by": "Pabitra",
"created_time": "Thu, 07 Aug 2025 09:34:19 GMT",
"event_name": "conversion.cancelled",
"program_code": "program-code",
"sl_no": 2,
"subagent_code": "sub-agent-code",
"subscription_type": "n",
"updated_by": null,
"updated_time": "Thu, 07 Aug 2025 09:34:19 GMT",
"webhook_url": "test",
"x_api_key": "x-api-key"
}
]
{
"code": 400,
"message": "Error Message",
"status": "error"
}
♻️ Update Webhook
Update an existing webhook configuration.
- Endpoint
PATCH {{baseUrl}}/api/subscribe
Description
This API updates the configuration of an already subscribed webhook.
📩 Request Headers
x-api-key string required
Content-Type string required
application/json📦 Body Parameters
event_name string required
subscription_type string required
w for webhook or n for notification )agent_code string required
subagent_code string required
program_code string required
company_code string required
webhook_url string conditional
sender_email string conditional
x-api-key string conditional
updated_by string required
Request Example
- cURL
curl --location --request PATCH \
--url '{{baseUrl}}/api/subscribe' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
--data '{
"event_name": "{{event_name}}",
"subscription_type": "w",
"agent_code": "{{Shared Agent Code}}",
"subagent_code": "{{Shared Sub-Agent Code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"webhook_url": "{{webhook_url}}",
"x_api_key":"{{Shared X-API key}}",
"updated_by":"Test Admin"
}'
Response Example
- 200: Success
- 400: Error
{
"message": "Successfully Updated the webhook",
"status": "SUCCESS"
}
{
"code": 400,
"message": "Error Message",
"status": "error"
}
⛔ Delete Webhook
Delete an existing webhook subscription.
- Endpoint
DELETE {{baseUrl}}/api/subscribe
Description
This API is used to remove a previously subscribed webhook so that events are no longer sent to the configured URL.
📩 Request Headers
x-api-key string required
Content-Type string required
application/json📦 Body Parameters
event_name string required
agent_code string required
subagent_code string required
program_code string required
company_code string required
Request Example
- cURL
curl --location --request DELETE \
--url '{{baseUrl}}/api/subscribe' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'Content-Type: application/json' \
--data '{
"event_name": "{{event_name}}",
"agent_code": "{{Shared Agent Code}}",
"subagent_code": "{{Shared Sub-Agent Code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}"
}'
Response Example
- 200: Success
- 400: Error
{
"message": "Successfully Deleted the webhook",
"status": "SUCCESS"
}
{
"code": 400,
"message": "Error Message",
"status": "error"
}