Paytrie Developer Documentation
API ReferenceWebhook

Create or replace the webhook configuration

PUT
/webhook-configurations

Sets the URL Paytrie will deliver all v2 webhook envelopes to. Full replacement — any prior URL is overwritten.

On the very first PUT for an integrator that does not yet have a signing secret, a new secret is generated atomically and included in the response as signingSecret. Save it immediately — it will not be returned again. On subsequent PUTs the field is omitted. To rotate later, use POST /v2/webhook-configurations/signing-secret/rotate.

Authorization

ApiKeyAuth
x-api-key<token>

API key for integrator authentication

In: header

Header Parameters

x-api-key*string

API key for authentication

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

import { PaytrieAPI, configure } from '@paytrie/sdk'configure({ headers: { 'x-api-key': process.env.PAYTRIE_API_KEY! } })const { data } = await PaytrieAPI.setWebhookConfiguration({  url: "https://partner.example.com/webhooks"})
{  "success": true,  "data": {    "url": "https://partner.example.com/webhooks",    "createdAt": "2026-05-19T20:41:09.000Z",    "updatedAt": "2026-05-19T20:41:09.000Z",    "signingSecret": "whsec_..."  }}
{  "success": false,  "errors": [    {      "field": "string",      "message": "string"    }  ]}