Skip to main content
POST
/
api
/
v2
/
webhook
/
create
Create Webhook
curl --request POST \
  --url https://api.paytring.com/api/v2/webhook/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "topics": [
    "<string>"
  ],
  "active": true
}
'
Create a new webhook endpoint to receive notifications for specific events.

Body Parameters

url
string
required
The URL where notifications will be sent.
topics
array
List of event types to subscribe to (e.g., ["order.paid", "order.failed"]).
active
boolean
(Optional) Set to true to enable the webhook immediately (Default: true).

Sample Request

curl --location 'https://api.paytring.com/api/v2/webhook/create' \
--user '<API_KEY>:<API_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
    "url": "https://your-domain.com/webhook",
    "topics": ["order.paid"],
    "active": true
}'

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
url
string
required

The URL where notifications will be sent.

topics
string[]

List of event types to subscribe to.

active
boolean
default:true

Set to true to enable the webhook immediately.

Response

200

Webhook created successfully