Skip to main content

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

FieldNameTypeRangeExampleDefaultOptionalRemarkRule
urlURLstring[1, 64]required
event_typesEvent Typearray[1,64]required
descriptionDescriptionstring[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"
}