Register a webhook endpoint
Registers an HTTPS URL for this account and mode, and returns its signing
secret once. Store the secret: it is never shown again, and every delivery is
signed with it.
The URL must be https:// and publicly reachable, in test mode as well as live;
localhost and private ranges are refused (400 invalid_webhook_url). Use a
tunnel to receive sandbox events on a laptop. Registering the same URL twice for
one account is 409 webhook_url_in_use.
Authorization
ApiKey An account API key, sent as Authorization: Bearer tz_live_…. The prefix
selects the mode: tz_test_ for sandbox, tz_live_ for real money.
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
curl -X POST "https://example.com/v1/webhook_endpoints" \ -H "Content-Type: application/json" \ -d '{ "url": "https://api.example.com/tizon/webhooks" }'{ "id": "string", "object": "webhook_endpoint", "url": "string", "description": "string", "enabled_events": [ "string" ], "status": "active", "disabled_reason": "string", "secret": "string", "last_success_at": "2019-08-24T14:15:22Z", "last_failure_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}