POST
/
api
/
v1
/
csp
/
webhook
Create Webhook
curl --request POST \
  --url https://sandbox.paylias.xyz/gateway/api/v1/csp/webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'idempotency-key: <idempotency-key>' \
  --header 'x-partner-id: <x-partner-id>' \
  --data '{
  "name": "Payment Webhook",
  "endpoint": "https://example.com/webhook",
  "events": [
    {
      "record_type": "RT_PaymentSubmissions",
      "event_type": "EK_Created"
    },
    {
      "record_type": "RT_PaymentSubmissions",
      "event_type": "EK_Updated"
    }
  ],
  "enabled": true,
  "secret": "ASDLKJASDFLKJ121232342"
}'
{
  "data": {
    "description": "Webhook to consume link events",
    "endpoint": "https://www.postb.in/1743272420303-9920796800870",
    "enabled": false,
    "events": [
      {
        "record_type": "RT_PaymentSubmissions",
        "event_type": "EK_Created"
      },
      {
        "record_type": "RT_PaymentSubmissions",
        "event_type": "EK_Updated"
      }
    ],
    "name": "Link Events",
    "secret": "2ff46f215a5bb7da8f7fda9b2b0c9ef86c9e7de6"
  },
  "ok": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-partner-id
string
default:""
required

The Partner ID header used for authorization

idempotency-key
string
default:""
required

The Idempotency Key - usually a UUID

Body

application/json

Request to create a new webhook

The body is of type object.

Response

200
application/json

Successful retrieval of a webhook subscription

Standard response structure for successful operations