POST
/
webhooks
curl --request POST \
  --url https://api.notchpay.co/webhooks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://example.com/webhooks",
  "description": "Webhook principal",
  "events": [
    "payment.created"
  ]
}'
{
  "code": 201,
  "status": "Created",
  "message": "Webhook endpoint created successfully",
  "endpoint": {
    "id": "wh_123456789",
    "url": "https://example.com/webhooks",
    "description": "Webhook principal",
    "events": [
      "payment.complete"
    ],
    "created_at": "2023-01-01T12:00:00.000Z",
    "updated_at": "2023-01-02T12:00:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

Body

application/json

Response

201
application/json
Webhook endpoint created

The response is of type object.