Webhooks

Create a webhook

Register a new webhook endpoint and subscribe it to one or more event types.

Authorization

Public key Secret key
x-fngs-public-key<token>

In: header

x-fngs-secret-key<token>

In: header

Request Body

application/json

POST /v0/webhooks/create Request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

POST
/v0/webhooks/create
curl -X POST "https://example.com/v0/webhooks/create" \  -H "Content-Type: application/json" \  -d '{    "url": "string",    "status": "active",    "secret": "stringstringstri"  }'
{  "status": "success",  "data": {    "webhook": {      "object": "webhook",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "url": "string",      "status": "active",      "secret": "string",      "events": [        "payment_success"      ],      "lastBlockReason": "malformed_url",      "lastBlockedAt": null,      "consecutiveFailures": 0,      "failingSince": null,      "createdAt": 0,      "deletedAt": null    }  }}