---
title: "Add Webhook Endpoint"
method: POST
path: "/api/merchant/{key}/webhook"
tags: ["Payment APIs"]
---

# Add Webhook Endpoint

`POST /api/merchant/{key}/webhook`

Add the webhook endpoint for PortOne. Along with Webhook details you'll need to specify the environment and webhook type in the request. Refer PortOne docs for additional details.

## Path parameters

- `key` string, required

## Headers

- `X-Portone-Client-Key` string
- `Authorization` string

## Request body

- object
  - `name` string, required — The unique name of webhook endpoint.
  - `url` string, required — The unique url for webhook endpoint.
  - `type` 'payment_status' | 'payment_link_status' | 'refund_status' | 'subscription_status' | 'payout_status' | 'onboarding_status', required — The type of webhook being configured. Refer <a href="/docs/webhook-configuration" target="_blank">PortOne Webhooks</a> for more information.
  - `environment` 'live' | 'sandbox', required — The environment of the transaction is either live OR sandbox

## Response `200`

Successful response

- object
  - `content` WebhookContent
    - `name` string — The name of the webhook
    - `uuid` string — The unique identifier for the webhook
    - `url` string — The URL of the webhook
    - `enabled` boolean — The boolean flag indicating whether webhook is enabled or not
    - `created_at` string — The timestamp of when the webhook was created.
    - `type` string — The type of the webhook. E.g. payment_status, payout_status, Refer PortOne docs.
  - `message` string — The description of the API request execution result
  - `status_code` string — The status_code for transaction of transaction creation
  - `status_reason` string — The status_reason for transaction of transaction creation

## Other responses

- `401` — Failure response

---

[API](https://skmtc.net/portone/apis/payment-apis.md) · [All operations](https://skmtc.net/portone/apis/payment-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portone/payment-apis/versions/f3ccea652555/schema)
