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
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Shared X-API key |
| Content-Type | string | Yes | Must be application/json |
Request Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| program_code | string | Yes | Shared ProductID |
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Shared X-API key |
| Content-Type | string | Yes | Must be application/json |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_name | string | Yes | The name of the event to subscribe |
| subscription_type | string | Yes | Subscription type ( w for webhook or n for notification ) |
| agent_code | string | Yes | Main agent identifier |
| subagent_code | string | Yes | Sub-agent identifier |
| program_code | string | Yes | Shared ProductID |
| company_code | string | Yes | Your company’s unique identifier |
| created_by | string | Yes | Name of creator |
| webhook_url | string | Yes | Target URL to send event payloads |
| updated_by | string | Yes | Only while updating the webhook |
| x-api-key | string | Yes | Shared X-API key |
Request Example
- cURL
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": "{{agent_code}}",
"subagent_code": "{{sub_agent_code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"created_by": "Test Admin",
"webhook_url": "{{webhook_url}}",
"updated_by": "",
"x_api_key":"{{Shared X-API key}}"
}'
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Shared X-API key |
| Content-Type | string | Yes | Must be application/json |
Request Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| program_code | string | Yes | Shared ProductID |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent_code | string | Yes | Main agent identifier |
| subagent_code | string | Yes | Sub-agent identifier |
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":"{{agent_code}}",
"subagent_code":"{{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
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Shared X-API key |
| Content-Type | string | Yes | Must be application/json |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_name | string | Yes | The name of the event to subscribe |
| subscription_type | string | Yes | Subscription type ( w for webhook or n for notification ) |
| agent_code | string | Yes | Main agent identifier |
| subagent_code | string | Yes | Sub-agent identifier |
| program_code | string | Yes | Shared ProductID |
| company_code | string | Yes | Your company’s unique identifier |
| created_by | string | Yes | Name of creator |
| webhook_url | string | Yes | Target URL to send event payloads |
| updated_by | string | Yes | User updated the subscription |
| x-api-key | string | Yes | Shared X-API key |
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": "{{agent_code}}",
"subagent_code": "{{sub_agent_code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"created_by": "Test Admin",
"webhook_url": "{{webhook_url}}",
"updated_by":"Test Admin",
"x_api_key":"{{Shared X-API key}}"
}'
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Shared X-API key |
| Content-Type | string | Yes | Must be application/json |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_name | string | Yes | The name of the event to subscribe |
| subscription_type | string | Yes | Subscription type ( w for webhook or n for notification ) |
| agent_code | string | Yes | Main agent identifier |
| subagent_code | string | Yes | Sub-agent identifier |
| program_code | string | Yes | Shared ProductID |
| company_code | string | Yes | Your company’s unique identifier |
| created_by | string | Yes | Name of creator |
| webhook_url | string | Yes | Target URL to send event payloads |
| updated_by | string | Yes | User updated the subscription |
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}}",
"subscription_type": "w",
"agent_code": "{{agent_code}}",
"subagent_code": "{{sub_agent_code}}",
"program_code": "{{Shared ProductID}}",
"company_code": "{{company_code}}",
"created_by": "Test Admin",
"webhook_url": "{{webhook_url}}",
"updated_by":"Test Admin"
}'
Response Example
- 200: Success
- 400: Error
{
"message": "Successfully Deleted the webhook",
"status": "SUCCESS"
}
{
"code": 400,
"message": "Error Message",
"status": "error"
}