Skip to main content
POST
/
webhook
Create a new webhook
curl --request POST \
  --url https://api.clickpay.app.br/webhook \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "url": "https://example.com/webhook",
  "name": "Payment Webhook",
  "events": [
    "order_created",
    "order_paid"
  ]
}
'
{
  "id": "67b14aa9-daac-800e-83bf-f1b44468d1d9",
  "url": "https://example.com/webhook",
  "name": "Payment Webhook",
  "companyId": "67b14aa9-daac-800e-83bf-f1b44468d1d9",
  "status": "ACTIVE",
  "events": [
    "order_created",
    "order_paid"
  ],
  "createdAt": "2024-02-15T12:34:56Z",
  "updatedAt": "2024-02-16T12:34:56Z"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
url
string
required

Webhook URL

Example:

"https://example.com/webhook"

name
string
required

Webhook name

Example:

"Payment Webhook"

events
enum<string>[]
required

List of events to subscribe

Available options:
charge.pending,
charge.processing,
charge.paid,
charge.received,
charge.expired
Example:
["order_created", "order_paid"]

Response

201 - application/json

Webhook created successfully

id
string
required

Webhook id

Example:

"67b14aa9-daac-800e-83bf-f1b44468d1d9"

url
string
required

Webhook URL

Example:

"https://example.com/webhook"

name
string
required

Webhook name

Example:

"Payment Webhook"

companyId
string
required

Company id

Example:

"67b14aa9-daac-800e-83bf-f1b44468d1d9"

status
string
required

Webhook status

Example:

"ACTIVE"

events
enum<string>[]
required

List of subscribed events

Available options:
charge.pending,
charge.processing,
charge.paid,
charge.received,
charge.expired
Example:
["order_created", "order_paid"]
createdAt
string<date-time>
required

Creation date

Example:

"2024-02-15T12:34:56Z"

updatedAt
string<date-time>
required

Update date

Example:

"2024-02-16T12:34:56Z"