fix: update webhook endpoints to api.nfse.io/v2#18
Open
ianchamba wants to merge 1 commit intonfe:masterfrom
Open
fix: update webhook endpoints to api.nfse.io/v2#18ianchamba wants to merge 1 commit intonfe:masterfrom
ianchamba wants to merge 1 commit intonfe:masterfrom
Conversation
9fc8862 to
6806d8b
Compare
d5aa952 to
d3914d7
Compare
- Rename 'hooks' to 'webhooks' in APIResource objectBaseURI mapping - Override endpointAPI() in NFe_Webhook to use https://api.nfse.io/v2/webhooks instead of the deprecated api.nfe.io/v1/hooks endpoint - Override CRUD methods to handle v2 response structure where webhook data is wrapped in "webHook" (camelCase singular) instead of "webhooks" - Update WebhookTest.php to use v2 response properties (uri instead of url) - Webhook methods remain simple (no company scope needed) API v2 response example: {"webHook": {"id": "...", "uri": "...", "secret": "...", "status": "Active"}} Co-Authored-By: Claude Opus 4.6 <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.
Summary
api.nfe.io/v1/hookstoapi.nfse.io/v2/webhooks/v1/hooks/{id}) returns 404 - webhooks now live atapi.nfse.io/v2/webhooks/{id}Changes
lib/NFe/APIResource.phpobjectBaseURI()mapping:'hooks'->'webhooks'lib/NFe/Webhook.phpendpointAPI()override to usehttps://api.nfse.io/v2/webhooksas base URLapi.nfe.io/v1as beforeTest plan
NFe_Webhook::fetch($webhookId)hitsapi.nfse.io/v2/webhooks/{id}NFe_Webhook::create($data)POSTs toapi.nfse.io/v2/webhooksapi.nfe.io/v1🤖 Generated with Claude Code