feat(webhook): per-instruction beneficiary event payload#16
Merged
diegopereira90 merged 3 commits intomainfrom Apr 30, 2026
Merged
feat(webhook): per-instruction beneficiary event payload#16diegopereira90 merged 3 commits intomainfrom
diegopereira90 merged 3 commits intomainfrom
Conversation
Aligns the fx-webhook docs with the fx-payment refactor (PR tracefinance/fx-payment#67). Each beneficiary lifecycle event now carries the affected payment instruction plus beneficiary context, instead of the full beneficiary snapshot with the entire instruction list. Schema changes: - `BeneficiaryEvent` -> `BeneficiaryPaymentInstructionEvent` - `instructions: List<PaymentInstructionEvent>` -> `instruction: PaymentInstructionEvent` - adds `relationshipType` (`SELF_OWNED` | `THIRD_PARTY`) The three webhook operations (`BENEFICIARY_PAYMENT_INSTRUCTION_CREATED` / `_APPROVED` / `_REJECTED`) now reference the new schema, and the narrative descriptions are updated — consumers needing the full set of instructions on a beneficiary should call `GET /api/beneficiaries/{beneficiaryId}` on the fx-payment API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Mirrors the convention already in use across fx-payment, fx-account, fx-auth, fx-customer-compliance, and fx-identity. Posts a Slack message when a PR is opened/reopened and updates the same message when the PR is closed/merged. Reads `SLACK_PR_BOT_TOKEN` and `SLACK_PR_BACKEND_CHANNEL_ID` from org/repo secrets. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
marioalvial
approved these changes
Apr 30, 2026
Reverts the file added in af64ecf. Out of scope for this PR — its purpose is the webhook event payload shape change in fx-webhook.
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
Aligns the fx-webhook docs with the fx-payment refactor in tracefinance/fx-payment#67. Each beneficiary lifecycle event now carries the affected payment instruction plus beneficiary context, instead of the full beneficiary snapshot with the entire instruction list.
Schema changes (BREAKING)
BeneficiaryEvent→BeneficiaryPaymentInstructionEventinstructions: List<PaymentInstructionEvent>→instruction: PaymentInstructionEvent(single affected instruction)relationshipType(SELF_OWNED|THIRD_PARTY) — already present on the create-beneficiary request, now exposed on the event for consumers building review/notification flowsBENEFICIARY_PAYMENT_INSTRUCTION_CREATED/_APPROVED/_REJECTEDoperations all reference the new schema_APPROVEDand_REJECTEDmdx descriptions no longer point atinstructions[].statusConsumers that need the full instruction list for a beneficiary should call
GET /api/beneficiaries/{beneficiaryId}on the fx-payment API.Test plan
apis/fx-webhook/openapi.ymlvalidates (no stale\$refto the renamed schema; grep forBeneficiaryEvent/instructions[in docs returns nothing)🤖 Generated with Claude Code