Repository navigation
fix(listen): show the resource ID for API v2 webhook events - #50
Merged
Merged
Conversation
The listener read the event ID from data.id, but API v2 payloads nest the resource under a key named after the event prefix (data.transparent.id, data.checkout.id, data.subscription.id, data.transfer.id, and data.withdraw.id for payout.*). Every v2 event showed an empty "[]". - add parseEnvelope, shared by Listener and TailListener, which tries the prefix key (plus the payout -> withdraw alias), then data.id, then the top-level id - omit the brackets entirely when no ID is found Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChristoPy
added a commit
to AbacatePay/documentation
that referenced
this pull request
Oct 4, 2026
Acompanha AbacatePay/abacatepay-cli#50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChristoPy
added a commit
to AbacatePay/documentation
that referenced
this pull request
Oct 4, 2026
* docs(cli): alinha a documentação da CLI com a v0.1.4 Remove comandos que não existem mais (whoami, status, profile, switch, payments create/check, trigger, events, logs, verify, update, docs, listen --mock) e documenta o que a CLI faz hoje. - corrige o header de assinatura para X-Webhook-Signature com a chave HMAC pública (antes: X-Abacate-Signature com whsec_) - corrige a instalação (install.sh, go install .../cmd/abacatepay) - documenta `upgrade`, o painel interativo do `listen` e que o `listen` só recebe eventos de dev mode - marca `-l/--local` como obsoleta e remove o IP do servidor de teste - remove a menção a skills integradas na CLI e corrige o link da CLI na página de ecossistema Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(cli): documenta só a saída TUI A CLI deixou de ter os formatos json e table (AbacatePay/abacatepay-cli#49). Troca os exemplos JSON pela saída real do terminal, remove a flag `-o/--output`, mostra o painel do `listen` e reescreve o caso de CI para usar o código de saída em vez de interpretar JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(cli): mostra o ID do recurso no painel do listen Acompanha AbacatePay/abacatepay-cli#50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
O
listenlia o ID do evento emdata.id. Só que os payloads da API v2 aninham o recurso numa chave com o nome do prefixo do evento. Resultado: todo evento v2 aparecia com colchetes vazios no painel.transparent.*data.transparent.idcheckout.*data.checkout.idsubscription.*data.subscription.id(oiddo topo é olog_...)transfer.*data.transfer.idpayout.*data.withdraw.idCorreção
parseEnvelope(internal/webhook/envelope.go), usado porListenereTailListener. A ordem de busca é:data.<prefixo>.id, com o aliaspayout → withdraw;data.id, para payloads antigos;iddo topo.Testes
go build,go vetego test ./...passam.🤖 Generated with Claude Code