Webhooks (configuração)
Atualizar webhook
Mude o endereço de entrega, ligue ou desligue, ou ajuste quais eventos um webhook recebe, alterando só o que precisar.
Autorização
BearerAuth AutorizaçãoBearer <token>
Em: header
Parâmetros de path
id*string
Id do webhook.
Corpo da requisição
application/json
Definições TypeScript
Use o tipo request body no TypeScript.
Corpo da resposta
application/json
curl --request PATCH \ --url 'https://api.payzu.processamento.com/v1/user/webhooks/PAYZU2025081418333632CYKN8M' \ --header 'Authorization: Bearer $PAYZU_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://sualoja.com.br/webhook", "active": true, "events": [ "TRANSACTION_PENDING" ]}'const url = 'https://api.payzu.processamento.com/v1/user/webhooks/PAYZU2025081418333632CYKN8M';const response = await fetch(url, { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.PAYZU_TOKEN}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ url: 'https://sualoja.com.br/webhook', active: true, events: [ 'TRANSACTION_PENDING' ] }),});const data = await response.json();console.log(data);import osimport requestsresponse = requests.patch( 'https://api.payzu.processamento.com/v1/user/webhooks/PAYZU2025081418333632CYKN8M', headers={ 'Authorization': f'Bearer {os.environ["PAYZU_TOKEN"]}', 'Content-Type': 'application/json', }, json={ 'url': 'https://sualoja.com.br/webhook', 'active': True, 'events': [ 'TRANSACTION_PENDING' ] },)print(response.json())200
{
"id": "yl9k2m0c8x1",
"url": "https://sualoja.com.br/webhook",
"active": true,
"TRANSACTION_COMPLETED",
"TRANSACTION_REFUNDED"
],
"hasSecret": true,
"createdAt": "2026-08-10T12:00:00.000Z",
"updatedAt": "2026-08-10T12:00:00.000Z"
}