feat: add webhook configuration UI to Payment Settings#4587
Open
hs-control-center-bot wants to merge 9 commits intomainfrom
Open
feat: add webhook configuration UI to Payment Settings#4587hs-control-center-bot wants to merge 9 commits intomainfrom
hs-control-center-bot wants to merge 9 commits intomainfrom
Conversation
Add a comprehensive Webhook Configuration tab to the Payment Settings page, allowing merchants to configure webhook endpoint, authentication, event triggers, and granular status-based event selection directly from the dashboard. Closes #4584 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add explicit return type annotations to constructWebhookDetailsObject in V1/V2 utils to disambiguate from webhookDetailsRequest types that now share the same fields. Add missing webhook status fields to default business profile record. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use parsed profile data for webhook form initial values so username, password, and version fields are always present. Remove fixed dropdown direction on payout statuses to allow auto-detection of viewport space. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These sensitive fields should not be prefilled from the profile data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ser autofill Browser force-autofills login credentials into fields with type="password" regardless of autocomplete="off" or missing name attributes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove statuses that don't map to webhook EventTypes in the backend: - Payment: remove requires_payment_method, requires_confirmation; add partially_captured_and_processing - Refund: keep only failure, success - Payout: keep only success, failed, cancelled, initiated, expired, reversed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These were removed to prevent prefill but the actual issue was browser autofill (fixed by removing type="password"). Saved values should display. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…l values setOptionString skips None values entirely, leaving the form fields uninitialized. setDictNull always sets the field (value or null), consistent with how webhook_url and webhook_version are handled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…emove redundant module prefixes Move the shared utility to LogicUtils since it's generic, remove duplicates from V1/V2 utils, and drop unnecessary BusinessProfileInterfaceUtils prefixes where the module is already opened.
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.
Type of Change
Description
Add a comprehensive Webhook Configuration tab to the Payment Settings page, allowing merchants to configure all webhook-related settings directly from the dashboard instead of using the API.
Changes:
New file:
PaymentSettingsWebhookConfiguration.res— New tab component with 3 sections:Type updates (common, V1, V2):
payment_statuses_enabled,refund_statuses_enabled,payout_statuses_enabledtowebhookDetailstypeswebhookDetailsRequest_v1andwebhookDetailsRequest_v2from justwebhook_urlto include all 10 webhook fieldsUtils updates:
constructWebhookDetailsObjectin all 3 utils to parse new fieldsconstructWebhookDetailsRequestObjectin V1 and V2 to send all webhook fields in the request payloadUI updates:
PaymentSettingsRevampedHelper.resparseBusinessProfileForPaymentBehaviourto populate all webhook fieldsPaymentSettingsRevamped.resMotivation and Context
Closes #4584
Merchants currently need to manually call the Business Profile Update API to configure webhook settings. This change provides a self-service UI for all webhook configuration, eliminating API dependency.
How did you test it?
Where to test it?
Checklist
npm run re:build