Create a webhook
curl -X POST "https://test-api.kashier.io/v2/webhooks" \ -H "Content-Type: application/json" \ -d '{ "name": "Orders production endpoint", "url": "https://shop.example.com/kashier/webhook", "headers": { "X-Shop-Token": "whsec_live_abc123", "X-Env": "production" }, "events": [ "pay", "refund", "void", "TRANSFERRED" ], "mode": "live", "isActive": true }'{ "_id": "string", "merchantId": "string", "name": "string", "url": "http://example.com", "headers": { "property1": "string", "property2": "string" }, "events": [ "pay" ], "mode": "test", "isActive": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Creates a new webhook for your merchant. The webhook's url must be https. There is a cap on how many webhooks you can hold in each mode; once you reach it, creating another webhook in that mode is rejected until you delete one.
Authorization
secretKey Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
List your webhooks GET
Returns every webhook configured for your merchant, across both modes.
List subscribable events GET
Returns the catalog of event types a webhook can subscribe to — the exact values that are valid in the events array of Create a webhook and Update a webhook. Read this catalog rather than hard-codi…