Delete Webhook API
This API is used to permanently delete a webhook configuration using its webhookId. You must pass a valid access token in the request header. Once deleted, the webhook will no longer receive any event callbacks from PhonePe.
Environment
| Environment | Http Method | API |
|---|---|---|
Sandbox | DELETE | https://api-preprod.phonepe.com/apis/pg-sandbox/configs/v1/webhooks/{webhookId} |
Production | DELETE | https://api.phonepe.com/apis/pg/configs/v1/webhooks/{webhookId} |
Request
Request Headers
| Header Name | Header Value | Description |
|---|---|---|
Content-Type | application/json | |
Authorization | O-Bearer <access_token> | Pass access_token received in Authorization call |
Response
Response Headers
| Header Name | Header Value |
|---|---|
Content-Type | application/json |
Sample Response for case 1: Success Response without response body
Http Response Code: 204Sample Response for case 2: Failed with Invalid Auth Token
{
"code": "BAD_REQUEST",
"message": "Cannot make more than 30 webhooks"
}Sample Response for case 3: Failed with Invalid Auth Token
{
"code": "AUTHORIZATION_FAILED",
"message": "Authorization failed [message = Please check the authorization token and try again]"
}Sample Response case 4: Internal Server Error
{
"code": "INTERNAL_SERVER_ERROR",
"message": "There is an error trying to process your transaction at the moment. Please try again in a while."
}