1. Webhook
Tjar
  • 🗂️ Overview
  • 🚀 Start Here
  • Orders
    • List Orders
      GET
    • Get Order Details
      GET
    • Order Statuses
      GET
    • Create Order
      POST
    • Change Order Status
      POST
  • Products
    • Digital
      • Create Digital Product
      • Get Digital Product Details
      • Update Digital Product
    • Booking
      • Get Booking Product Details
      • Create Booking Product
      • Update Booking Product
    • Service
      • Get Service Product
      • Create Service Product
      • Update Service Product
    • List All Products
      GET
    • Get Product Details
      GET
    • Create Product
      POST
    • Update Product
      PATCH
    • Delete Product
      DELETE
  • Media
    • Upload Media
      POST
    • Upload Multiple Media
      POST
    • Update Media
      POST
  • Webhook
    • List Webhooks
      GET
    • Register Webhook
      POST
    • Update Webhook
      PUT
    • Delete Webhook
      DELETE
    • Verify Signature
      POST
    • Refresh Secret
      POST
    • Webhook Events
      GET
  • Abandoned Cart
    • List Abandoned Carts
    • Get Abandoned Cart Details
    • Send Reminder
  1. Webhook

Register Webhook

Developing
POST
/webhooks
Last modified:2026-04-01 21:27:04

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Body

🟠422Validation Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/webhooks' \
--header 'Accept: application/json' \
--header 'Accept-Language: {{lang}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Order Events",
    "url": "https://yourapp.com/webhook",
    "method_type": "POST",
    "events": [
        "order.created",
        "order.updated"
    ],
    "secret": "optional-custom-secret-min-32-chars-long",
    "status": 1
}'
Response Response Example
201 - Example 1
{
    "status": "success",
    "message": "Webhook registered successfully. Store the secret safely — it will not be shown again.",
    "data": {
        "webhook": {
            "id": 24,
            "name": "Order Events",
            "url": "https://yourapp.com/webhook",
            "method_type": "POST",
            "status": 1,
            "created_at": "2026-04-02 00:26:18",
            "updated_at": "2026-04-02 00:26:18",
            "events": [
                {
                    "id": 60,
                    "event_name": "order.created"
                },
                {
                    "id": 61,
                    "event_name": "order.updated"
                }
            ]
        },
        "plain_secret": "optional-custom-secret-min-32-chars-long"
    }
}
Modified at 2026-04-01 21:27:04
Previous
List Webhooks
Next
Update Webhook
Built with