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

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key
Content-TypestringYesMust be application/json

Request Query Parameters

ParameterTypeRequiredDescription
program_codestringYesShared ProductID

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

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
event_namestringYesThe name of the event to subscribe
subscription_typestringYesSubscription type ( w for webhook or n for notification )
agent_codestringYesMain agent identifier
subagent_codestringYesSub-agent identifier
program_codestringYesShared ProductID
company_codestringYesYour company’s unique identifier
created_bystringYesName of creator
webhook_urlstringYesTarget URL to send event payloads
updated_bystringYesOnly while updating the webhook
x-api-keystringYesShared X-API key

Request Example

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

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

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key
Content-TypestringYesMust be application/json

Request Query Parameters

ParameterTypeRequiredDescription
program_codestringYesShared ProductID

Request Body Parameters

ParameterTypeRequiredDescription
agent_codestringYesMain agent identifier
subagent_codestringYesSub-agent identifier

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":"{{agent_code}}",
"subagent_code":"{{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

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
event_namestringYesThe name of the event to subscribe
subscription_typestringYesSubscription type ( w for webhook or n for notification )
agent_codestringYesMain agent identifier
subagent_codestringYesSub-agent identifier
program_codestringYesShared ProductID
company_codestringYesYour company’s unique identifier
created_bystringYesName of creator
webhook_urlstringYesTarget URL to send event payloads
updated_bystringYesUser updated the subscription
x-api-keystringYesShared X-API key

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

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

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
event_namestringYesThe name of the event to subscribe
subscription_typestringYesSubscription type ( w for webhook or n for notification )
agent_codestringYesMain agent identifier
subagent_codestringYesSub-agent identifier
program_codestringYesShared ProductID
company_codestringYesYour company’s unique identifier
created_bystringYesName of creator
webhook_urlstringYesTarget URL to send event payloads
updated_bystringYesUser updated the subscription

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

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