Paytrie Developer Documentation
API ReferenceWebhook

Rotate the webhook signing secret

View as Markdown
POST
/webhook-configurations/signing-secret/rotate

Generates a new HMAC-SHA256 signing secret used to sign webhook payloads. The previous secret is invalidated immediately. Update your verification logic before rotating.

Note: Any v1 webhooks still enabled for your API key are signed with this same secret.

Authorization

ApiKeyAuth
x-api-key<token>

API key for integrator authentication

In: header

Header Parameters

x-api-key*string

API key for authentication

Response Body

application/json

application/json

application/json

application/json

import { PaytrieAPI, configure } from '@paytrie/sdk'configure({ headers: { 'x-api-key': process.env.PAYTRIE_API_KEY! } })const { data } = await PaytrieAPI.rotateWebhookSigningSecret()
{  "success": true,  "data": {    "signingSecret": "whsec_abc123..."  }}
{  "success": false,  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ]}
{  "success": false,  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ]}
{  "success": false,  "errors": [    {      "field": "string",      "message": "string",      "code": "string"    }  ]}