Create Webhook Endpoint
Introduction
You can configure webhook endpoints via the API directly or in PiedPay Dashboard.
Most users configure webhooks from the dashboard, which provides a friendly user interface.
Related guide: Webhooks
Interface
POST /v1/webhook_endpoints
Request Params
Field | Name | Type | Range | Example | Default | Optional | Remark | Rule |
---|---|---|---|---|---|---|---|---|
url | URL | string | [1, 64] | required | ||||
event_types | Event Type | array | [1,64] | required | ||||
description | Description | string | [1,64] | optional |
Response Example
200 success:
{
"id": "we_5mvXbDvD4qz550mj",
"object": "webhook_endpoint",
"livemode": true,
"url": "https://merchant.com/notify-receive-url",
"event_types": [
"subscription.created",
"subscription.succeeded"
],
"account": "acct_z1eTG4",
"description": "some description",
"time_created": "2022-10-11T18:16:33+08:00"
}