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.

EnvironmentHttp MethodAPI
SandboxDELETEhttps://api-preprod.phonepe.com/apis/pg-sandbox/configs/v1/webhooks/{webhookId}
ProductionDELETEhttps://api.phonepe.com/apis/pg/configs/v1/webhooks/{webhookId}
Request Headers
Header NameHeader ValueDescription
Content-Typeapplication/json
AuthorizationO-Bearer <access_token>Pass access_token received in Authorization call
Response Headers
Header NameHeader Value
Content-Typeapplication/json
Sample Response for case 1: Success Response without response body
Http Response Code: 204
Sample 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."
}
Is this article helpful?