v1

latestOpenAPI 3.0.02026-07-246335313.6 KB
Payment APIs

Add Webhook Endpoint

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.

post/api/merchant/{key}/webhook

Path parameters

keystring required

Headers

X-Portone-Client-Keystring
Authorizationstring

The Authorization header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>

Request body

namestring required

The unique name of webhook endpoint.

urlstring 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

Example request

{
  "name": "webhook test",
  "url": "https://webhook.site/e707eb14-a2b4-4684-b8de-6470ed78f99cssdfsdf",
  "type": "payment_status",
  "environment": "live"
}

Response

Successful response

messagestring

The description of the API request execution result

status_codestring

The status_code for transaction of transaction creation

status_reasonstring

The status_reason for transaction of transaction creation