{"templateId":"markdown","versions":[{"version":"v2026.04","label":"v2026.04","link":"/pt-br/products/payments-direct-2/api-docs/payment-monitoring/notification-webhooks","default":true,"active":true,"folderId":"7e5507fe"},{"version":"v2026.03","label":"v2026.03","link":"/pt-br/products/payments-direct-2/v2026.03/api-docs/payment-monitoring/notification-webhooks","default":false,"active":false,"folderId":"7e5507fe"},{"version":"v2025.11","label":"v2025.11","link":"/pt-br/products/payments-direct-2/v2025.11/api-docs/payment-monitoring/notification-webhooks","default":false,"active":false,"folderId":"7e5507fe"}],"sharedDataIds":{"sidebar":"sidebar-@l10n/pt-BR/products/payments-direct-2/@v2025.11/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"Webhooks de notificação","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhooks-de-notificação","__idx":0},"children":["Webhooks de notificação"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Os webhooks são uma boa prática recomendada para receber notificações do ","Payments Direct"," sobre mudanças no status dos seus pagamentos, em vez de fazer polling repetidamente por atualizações."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Este tópico apresenta uma visão geral dos webhooks e orientações sobre como usar webhooks com o ","Payments Direct","."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"por-que-usar-webhooks-de-notificação","__idx":1},"children":["Por que usar webhooks de notificação"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Um webhook é um método pelo qual um serviço pode notificar um aplicativo cliente sobre eventos relevantes, enviando mensagens de notificação para uma URL de callback que o cliente registrou no serviço. Quando um evento ocorre, o serviço envia uma notificação para a URL de callback especificada, usando o método HTTP POST, para avisar o cliente de que há informações disponíveis sobre o evento. Isso evita que o cliente precise consultar o serviço continuamente em busca de novas informações."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Observação"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payments Direct"," não oferece suporte a URLs de callback autenticadas."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tipos-de-evento","__idx":2},"children":["Tipos de evento"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payments Direct"," oferece suporte, no momento, a notificações de webhook para o tipo de evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PAYMENT_STATE_TRANSITION"]},". Quando um pagamento passa de um estado para outro, o serviço envia à URL de callback registrada uma notificação com informações sobre o evento. Para mais informações, consulte ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#1-registrar-a-url-de-callback"},"children":["Registrar a URL de callback"]},"."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Este é atualmente o ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["único tipo de evento"]}," emitido no ","Payments Direct","."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["O payload segue um ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["design “thin-plus”"]},": não é um objeto de pagamento completo, mas inclui mais do que apenas um ID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cada webhook contém o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentId"]}," e o ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["novo estado do pagamento"]},", junto com alguns campos adicionais de contexto."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As abas a seguir mostram payloads de exemplo do evento de transição de estado do pagamento com diferentes estados:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"INITIATED","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"INITIATED\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:18.065Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"VALIDATING","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"VALIDATING\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:20.468Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"AWAITING_FUNDING","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"AWAITING_FUNDING\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:22.117Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TRANSFERRING","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"TRANSFERRING\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:32.455Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"COMPLETED","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"COMPLETED\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:43.254Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"RETURNED","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"RETURNED\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-06-02T09:14:07.331Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"FAILED","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"FAILED\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:43.254Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"DECLINED","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\", // The ID of the webhook notification\n    \"eventType\":\"PAYMENT_STATE_TRANSITION\", // The type of event\n    \"eventVersion\":1, // The version of the event. The version number may change if the event data changes\n    \"eventData\": { // The data of the event\n        \"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\", // The ID of the payment to which the event corresponds\n        \"expiresAt\":\"2025-07-28T17:18:35.663Z\", // The time when the payment expires\n        \"createdAt\":\"2025-05-29T17:18:35.663Z\", // The time when the payment was created\n        \"sourceCurrency\":\"USD\", // The source currency of the payment\n        \"sourceAmount\":8, // The source amount corresponding to the source currency of the payment\n        \"destinationCurrency\":\"COP\", // The destination currency of the payment\n        \"payoutAmount\":32538.81, // The payout amount corresponding to the destination currency of the payment\n        \"paymentState\":\"DECLINED\", // The state that the payment is currently in\n        \"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\" // The ID of the payment beneficiary\n    },\n    \"createDate\":\"2025-05-30T10:21:38.902Z\" // The time when the webhook notification was created\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Observação"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Os dados do evento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PAYMENT_STATE_TRANSITION"]}," não incluem detalhes como códigos de erro no caso de um pagamento ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FAILED"]},". Esse tipo de evento informa apenas sobre transições de estado do pagamento."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuração-e-segurança","__idx":3},"children":["Configuração e segurança"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para começar a receber notificações de webhook, siga estas etapas para registrar uma URL de callback e adicionar um endereço IP da Ripple à sua lista de permissões:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-registrar-a-url-de-callback","__idx":4},"children":["1. Registrar a URL de callback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No momento do seu onboarding no ","Payments Direct",", você precisa informar uma URL de callback para a qual o ","Payments Direct"," possa enviar notificações quando ocorrerem eventos. Recomendamos uma URL pública acessível pela internet, mas com acesso restrito. A URL de callback precisa ser HTTPS (não HTTP) e ter um certificado de chave pública. Entre em contato com o seu contato na Ripple para registrar a URL de callback do seu webhook. Essa URL é configurada na instância do ","Ripple Payments"," do seu aplicativo cliente."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-opcional-adicionar-os-endereços-ip-da-ripple-à-sua-lista-de-permissões","__idx":5},"children":["2. Opcional: adicionar os endereços IP da Ripple à sua lista de permissões"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para garantir que os callbacks de webhook venham do ","Ripple Payments",", pode ser necessário adicionar os endereços IP do ","Ripple Payments"," à lista de permissões do seu servidor."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para obter a lista de endereços IP a adicionar à sua lista de permissões, entre em contato com o seu contato na Ripple."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-opcional-verificar-as-assinaturas-dos-webhooks","__idx":6},"children":["3. Opcional: verificar as assinaturas dos webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para garantir que todas as notificações de webhook sejam geradas pela Ripple, você pode verificar as assinaturas dos webhooks usando uma chave pública que pode ser obtida com o seu contato na Ripple."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para verificar as assinaturas dos webhooks:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recupere o payload do webhook e a assinatura (do cabeçalho)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Exemplo"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"Body: {\"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\",\"eventType\":\"PAYMENT_STATE_TRANSITION\",\"eventVersion\":1,\"eventData\":{\"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\",\"expiresAt\":\"2025-07-28T17:18:35.663Z\",\"createdAt\":\"2025-05-29T17:18:35.663Z\",\"sourceCurrency\":\"USD\",\"sourceAmount\":8,\"destinationCurrency\":\"COP\",\"payoutAmount\":32538.81,\"paymentState\":\"VALIDATING\",\"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\"},\"createDate\":\"2025-05-30T10:21:20.468Z\"}\n\nHeaders:\nripple-signature: fcSWDhoHpNd+ZAQ2REndD7jacC1askGqltuXvFxp4MPWQ64w4cVz6yuvq3dAG/3pvCoJA10qXi/SCnvSXJajVKuOknU0WATEifQ+Zs4J06pCt2M0V8Ogcq2WIZ0+NUb2zvDfRr2o5UuzXVbEgDzZL0lC9s3PATQfcm3sJyYBSrCC35qf2NbkFye8i57jUPK8slEYwCwq6W+O+V1nFkNN6YMLi8MAHDSBsdGK+o/L1oCCckDaCFtMUaewVe15GKaQs6pHsVeLK0d7xgJmGciAnaifr7Ta2pv6dX4kTpIBzxy08VKiXHCRoRxZIyDF33jfHp5zVr/2H9xssGytZpDTkkSYYlgGNRS/mZxErE6Mddk2AN9ChMiWBq3TlMNLRCy3fCsICfLp/LqMqmU6/gr9uY41geLyzgozq2IanG4dHBuzHvyW8YykyeuifzFRKu4ykyKZpHTlYGe+ibDAh8Oo3XoO4iPe1NBqCFK+4EyjVgOa4LKT5XOBUxoXVUS4AxMun4MyPGNrOYVvLR2dzUc/5KeXVpWE4est6+XWLpSQduxRTwoeRHK7NdDyestKecWr0RS4le9FmvogBkuoCiMbMBrv+e0J9/A1X3txVXI+s6Zi72TwO6GqBAJx0bYRvAdKp3L9N2hcnd+P7NCnDKpb+hxc8+WeFkJcwtnqIupUVhw=\nripple-signature-timestamp: 2025-05-30T10:21:21.808586489Z\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Crie o hash da requisição concatenando o valor de ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ripple-signature-timestamp"]}," e o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}," da requisição como uma string separada por um ponto, por exemplo:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"2025-05-30T10:21:21.808586489Z.{\"id\":\"4d3f90cf-b70f-5ff1-827a-f8aa9cf84ab9\",\"eventType\":\"PAYMENT_STATE_TRANSITION\",\"eventVersion\":1,\"eventData\":{\"paymentId\":\"5ce2c433-a96d-48d0-8857-02637a60abf4\",\"expiresAt\":\"2025-07-28T17:18:35.663Z\",\"createdAt\":\"2025-05-29T17:18:35.663Z\",\"sourceCurrency\":\"USD\",\"sourceAmount\":8,\"destinationCurrency\":\"COP\",\"payoutAmount\":32538.81,\"paymentState\":\"VALIDATING\",\"beneficiaryToken\":\"cb207125-73a7-4a94-8502-a7780f1cae78\"},\"createDate\":\"2025-05-30T10:21:20.468Z\"}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Descriptografe o valor da assinatura usando a chave pública da Ripple obtida com o seu contato na Ripple."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Compare os valores de hash, ou seja, a assinatura descriptografada e o valor de hash que você criou."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se os valores coincidirem, o webhook é autêntico e não foi adulterado. Caso contrário, se não coincidirem, você deve rejeitar o webhook."]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Dica"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Além disso, você pode calcular a diferença entre o timestamp atual e o timestamp recebido para decidir se a diferença é aceitável."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tempos-de-resposta-e-comportamento-de-nova-tentativa","__idx":7},"children":["Tempos de resposta e comportamento de nova tentativa"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se a entrega de uma notificação de webhook falhar, ou seja, quando o cliente responde com qualquer código de status diferente de ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]},", o ","Payments Direct"," repete a notificação até 75 vezes (ou por 72 horas). O intervalo entre as novas tentativas é de 1 minuto após a primeira falha e de até uma hora após cada falha seguinte."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Novas tentativas e outros problemas de rede podem fazer com que notificações duplicadas sejam enviadas. Nesse caso, a Ripple recomenda que você mantenha uma lista das notificações duplicadas."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Esclarecimento"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ordem de entrega não é garantida. As notificações podem chegar fora de sequência, especialmente se houver novas tentativas após uma indisponibilidade. Os clientes precisam projetar os handlers de webhook para tratar mensagens fora de ordem com segurança."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Alternativa aos webhooks"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Como alternativa ao uso de webhooks para receber notificações do ","Ripple Payments"," sobre mudanças no status do pagamento, você pode usar a operação Search payments para fazer polling de atualizações de pagamento. Consulte ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/payments-direct-2/api-docs/payment-monitoring/polling"},"children":["Polling"]},"."]}]}]},"headings":[{"value":"Webhooks de notificação","id":"webhooks-de-notificação","depth":1},{"value":"Por que usar webhooks de notificação","id":"por-que-usar-webhooks-de-notificação","depth":2},{"value":"Tipos de evento","id":"tipos-de-evento","depth":2},{"value":"Configuração e segurança","id":"configuração-e-segurança","depth":2},{"value":"1. Registrar a URL de callback","id":"1-registrar-a-url-de-callback","depth":3},{"value":"2. Opcional: adicionar os endereços IP da Ripple à sua lista de permissões","id":"2-opcional-adicionar-os-endereços-ip-da-ripple-à-sua-lista-de-permissões","depth":3},{"value":"3. Opcional: verificar as assinaturas dos webhooks","id":"3-opcional-verificar-as-assinaturas-dos-webhooks","depth":3},{"value":"Tempos de resposta e comportamento de nova tentativa","id":"tempos-de-resposta-e-comportamento-de-nova-tentativa","depth":3}],"frontmatter":{"seo":{"title":"Webhooks de notificação"}},"lastModified":"2026-10-23T11:11:03.515Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt-br/products/payments-direct-2/api-docs/payment-monitoring/notification-webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}