Skip to main content

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.

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

Shared X-API key

Content-Type string required

Must be application/json

🔍 Query Parameters

program_code string required

Shared Product ID

Request Example

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

{
"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"
}

📨 Subscribe Webhook

Subscribe to a webhook for a specific event.

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

Shared X-API key

Content-Type string required

Must be application/json

📦 Body Parameters

event_name string required

Name of the event to subscribe

subscription_type string required

Subscription type ( w for webhook or n for notification )

agent_code string required

Shared Agent Code

subagent_code string required

Shared Sub Agent Code

program_code string required

Shared Product ID

company_code string required

Shared Company Code

created_by string required

Name of creator

webhook_url string conditional

Target URL to send event payloads

sender_email string conditional

Email address of the sender initiating the request

x-api-key string conditional

Shared X-API key

⚠️ Important Note on subscription_type

🔔 When subscription_type: "w" (Webhook)
  • You must provide these fields in request body:
    • webhook_url
    • x-api-key
  • sender_email is not required in the request body.
📩 When subscription_type: "n" (Email Notification)
  • You do not need to provide these fields in request body:
    • webhook_url
    • x-api-key
  • Provide sender_email only if your email ID has been whitelisted by HashDT Support. Until then, all email notifications will be sent from HashDT’s default system email.

📬 Sending Emails from Your Own Email ID

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

{
{
"message": "Webhook successfully subscribed",
"status": "SUCCESS"
}
}

📥 Retrieve Subscribed Webhook

Retrieves the details of all subscribed webhooks for a specific program.

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

Shared X-API key

Content-Type string required

Must be application/json

📦 Body Parameters

agent_code string required

Shared Agent Code

subagent_code string required

Shared Sub Agent Code

🔍 Query Parameters

program_code string required

Shared Product ID

Request Example

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

[
{
"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"
}
]

♻️ Update Webhook

Update an existing webhook configuration.

PATCH {{baseUrl}}/api/subscribe

Description

This API updates the configuration of an already subscribed webhook.

📩 Request Headers

x-api-key string required

Shared X-API key

Content-Type string required

Must be application/json

📦 Body Parameters

event_name string required

Name of the event subscribed

subscription_type string required

Subscription type ( w for webhook or n for notification )

agent_code string required

Shared Agent Code

subagent_code string required

Shared Sub Agent Code

program_code string required

Shared Product ID

company_code string required

Shared Company Code

webhook_url string conditional

Target URL to send event payloads

sender_email string conditional

Email address of the sender initiating the request

x-api-key string conditional

Shared X-API key

updated_by string required

User updating the webhook

Request Example

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

{
"message": "Successfully Updated the webhook",
"status": "SUCCESS"
}

⛔ Delete Webhook

Delete an existing webhook subscription.

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

Shared X-API key

Content-Type string required

Must be application/json

📦 Body Parameters

event_name string required

Name of the event subscribed

agent_code string required

Shared Agent Code

subagent_code string required

Shared Sub Agent Code

program_code string required

Shared Product ID

company_code string required

Shared Company Code

Request Example

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

{
"message": "Successfully Deleted the webhook",
"status": "SUCCESS"
}