Histórico de mensagens sobre webhook pix em pix

EXIBINDO CONVERSAS RECENTES:

Texto: webhook pix
Canal: pix
Avatar discord do usuario rfr0120

rfr0120

public void attachOurServerWebhookToEfiPayToReceivePaymentNotifications(String webhookUrl, String pixPaymentKey) {
HttpHeaders headers = new HttpHeaders();
String accessToken = authenticate().getAccessToken();
headers.setBearerAuth(accessToken);
headers.set("x-skip-mtls-checking", "true");

WebhookRequest webhookRequest = new WebhookRequest(webhookUrl);

try {
String jsonBody = objectMapper.writeValueAsString(webhookRequest);
ResponseEntity response = restTemplate.exchange(URL + "/v2/webhook/" + pixPaymentKey,
HttpMethod.PUT, new HttpEntity<>(jsonBody, headers), String.class);
LOGGER.info("Resposta do EfiPay: {}", response.getBody());

} catch (Exception e) {
LOGGER.error(e.getMessage());
}
}

Avatar discord do usuario joaolucas_efi

joaolucas_efi

Ver Respostas

@rfr0120 no caso você esta enviando o body da requisição vazio.
O body deve ter algo como:

{
"webhookUrl": "https://exemplo-pix/webhook"
}