创建 webhook
注册一个接收回调的 URL,并可选生成仅显示一次的 HMAC 密钥。
curl -X POST "https://api.payzu.processamento.com/v1/user/webhooks" \ -H "Authorization: Bearer {{token}}" \ -H "Content-Type: application/json" \ -d '{ "url": "https://sualoja.com.br/webhook" }'const body = JSON.stringify({ "url": "https://sualoja.com.br/webhook"})fetch("https://api.payzu.processamento.com/v1/user/webhooks", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer {{token}}" }, body})import requestsurl = "https://api.payzu.processamento.com/v1/user/webhooks"body = """{ "url": "https://sualoja.com.br/webhook"}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json", "Authorization": "Bearer {{token}}"})print(response.text)