Bunne Docs
Webhooks

Atualizar um endpoint de webhook.

Edita a url do endpoint e/ou os eventos assinados; ao menos um é obrigatório. O secret, o ambiente e o seller nunca são alterados. Reenviar a mesma url/eventos é um no-op. Exige a permissão webhooks:update.

PATCH
/webhook-endpoints/{id}

Edita a url do endpoint e/ou os eventos assinados; ao menos um é obrigatório. O secret, o ambiente e o seller nunca são alterados. Reenviar a mesma url/eventos é um no-op. Exige a permissão webhooks:update.

Autorização

ApiKeyAuth
AutorizaçãoBearer <token>

Em: header

Parâmetros de caminho

id*string
Match^whsec_[A-Za-z0-9]+$

Corpo da requisição

application/json

Definições TypeScript

Use o tipo request body em TypeScript.

Provide url and/or events; at least one is required.

Propriedades1 <= properties

Corpo da resposta

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/webhook-endpoints/whsec_endpoint_xxx" \  -H "Content-Type: application/json" \  -d '{    "events": [      "charge.paid",      "charge.refunded",      "chargeback.created"    ]  }'
{  "id": "string",  "object": "webhook_endpoint",  "url": "http://example.com",  "description": "string",  "environment": "TEST",  "events": [    "charge.created"  ],  "enabled": true,  "seller_id": "string",  "secret_rotation": {    "status": "active",    "rotated_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "warned_at": "2019-08-24T14:15:22Z",    "grace_ends_at": "2019-08-24T14:15:22Z",    "invalidated_at": "2019-08-24T14:15:22Z"  },  "created_at": "2019-08-24T14:15:22Z",  "request_id": "req_xxx"}