v1

latestOpenAPI 3.0.32026-07-26172157253.6 KB
Razorpay Payments

Rotate Razorpay Webhook Secret

Generate a new Razorpay webhook signing secret. Update the webhook secret in the Razorpay Dashboard after calling this endpoint.

post/api/payments/razorpay/{environment}/webhook/rotate-secret

Path parameters

environment'test' | 'live' required

Payment provider environment.

Response

Razorpay webhook setup values with the rotated secret

webhookUrlstring required

Webhook endpoint URL to copy into the Razorpay Dashboard.

webhookSecretstring required

Raw signing secret to copy into the Razorpay Dashboard.

Example response

{
  "connection": {
    "accountId": "acc_123",
    "merchantName": "Example Merchant",
    "webhookEndpointId": "manual",
    "webhookEndpointUrl": "https://api.example.com/api/webhooks/razorpay/test",
    "maskedKey": "rzp_test_...abcd"
  },
  "webhookUrl": "https://api.example.com/api/webhooks/razorpay/test",
  "webhookSecret": "webhook_secret_xxx"
}