Configure account webhook
Configures or updates the webhook URL for a specific event type. If a webhook already exists for the same event type, it will be updated (upsert behavior).
Requires a Bearer token in the Authorization header.
Event Description cash_inPIX received cash_outPIX sent refund_inRefund of received payment (refund requested) refund_outRefund received
Field Type Required Description urlstring Yes HTTPS URL of the endpoint that will receive the webhooks eventTypestring Yes Event type: cash_in, cash_out, refund_in, refund_out headersarray No Custom headers for authentication (maximum 5). Blocked headers: host, content-length, connection, transfer-encoding, content-type, user-agent headers[].keystring Yes Header name headers[].valuestring Yes Header value
{
"url" : "https://api.example.com/webhooks/pix" ,
"eventType" : "cash_in" ,
"headers" : [
{ "key" : "Authorization" , "value" : "Bearer token123" },
{ "key" : "X-Webhook-Secret" , "value" : "abc123" }
]
}
Field Type Description successboolean Indicates whether the operation was successful messagestring Descriptive message of the result
{
"success" : true ,
"message" : "Webhook configurado com sucesso"
}
Status Description 400 Invalid data (URL is not HTTPS, invalid event type, etc.) 401 Missing or invalid token 404 Account not found 500 Internal error configuring webhook