---
title: "Create a webhook secret"
method: POST
path: "/webhook/v3/secret"
tags: ["Webhook Service"]
---

# Create a webhook secret

`POST /webhook/v3/secret`

Creates a secret to be used in legacy webhooks for a merchant account or payout account. 

Set up a webhook secret for additional security. After you create a secret, each webhook includes a header containing a signature. You can use the signature to verify that all data received is authentic.

For a tutorial about configuring and using webhooks, see [Configuring legacy webhooks](https://docs.nexiopay.com/docs/configuring-legacy-webhooks) in Guides.

<!-- theme: info -->
> 📘 Note
> 
> For the current workflow, see the [Register webhook URLs](https://docs.nexiopay.com/reference/registerwebhookurls) endpoint instead.

<!-- theme: warning -->
> ⚠️ Try It
> 
> To use the Try It feature for this endpoint, you must use the credentials for your [Sandbox API user](https://docs.nexiopay.com/docs/sandbox-environments).


<div style="display:none;">

## Request parameters
- merchantId
- payoutAccountId

## Response parameters
- secret

</div>

## Request body

- union
  - object
    - `merchantId` string — The merchant ID to create a secret for. The ID parameter name to use is `merchantId`. Either this parameter or `payoutAccountId` is required.
  - object
    - `payoutAccountId` string — The Nexio ID for the payout account. The ID parameter name to use is `payoutAccountId`. Either this parameter or `merchantId` is required.

## Response `200`

Success

- object
  - `secret` string — The secret to be used in verifying the webhook's signature. Store the secret in a secure location in order to use it for that verification process. For a tutorial about verifying the signature, see [Receiving webhooks](https://docs.nexiopay.com/docs/receiving-webhooks) in Guides.

## Other responses

- `401` — Unauthorized. For help with this error and other error codes, see [Common errors](https://docs.nexiopay.com/docs/common-errors) in the Guides area.

---

[API](https://skmtc.dev/nexiopay/apis/payments-api-reference.md) · [All operations](https://skmtc.dev/nexiopay/apis/payments-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nexiopay/payments-api-reference/revisions/b414b73979e5/schema)
