Create Webhook
POST /v1/api/webhooksRequest body
Field
Type
Required
Description
Example
curl -X POST https://apipay.byastra.ai/v1/api/webhooks \
-H "X-Api-Key: ap_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/astrapay",
"events": ["payment.completed", "payment.canceled"]
}'Response 201 Created
{
"success": true,
"statusCode": 201,
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"url": "https://yourapp.com/webhooks/astrapay",
"events": ["payment.completed", "payment.canceled"],
"active": true,
"secret": "whsec_a1b2c3d4e5f6...",
"created_at": "2026-03-31T12:00:00.000Z"
}
}Last updated