Skip to content

feat(webhook): per-instruction beneficiary event payload#16

Merged
diegopereira90 merged 3 commits intomainfrom
feat/beneficiary-payment-instruction-event
Apr 30, 2026
Merged

feat(webhook): per-instruction beneficiary event payload#16
diegopereira90 merged 3 commits intomainfrom
feat/beneficiary-payment-instruction-event

Conversation

@diegopereira90
Copy link
Copy Markdown
Contributor

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)

  • BeneficiaryEventBeneficiaryPaymentInstructionEvent
  • instructions: List<PaymentInstructionEvent>instruction: PaymentInstructionEvent (single affected instruction)
  • new field relationshipType (SELF_OWNED | THIRD_PARTY) — already present on the create-beneficiary request, now exposed on the event for consumers building review/notification flows
  • BENEFICIARY_PAYMENT_INSTRUCTION_CREATED / _APPROVED / _REJECTED operations all reference the new schema
  • narrative descriptions updated; _APPROVED and _REJECTED mdx descriptions no longer point at instructions[].status

Consumers 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.yml validates (no stale \$ref to the renamed schema; grep for BeneficiaryEvent/instructions[ in docs returns nothing)
  • Mintlify preview renders the updated webhook event pages

🤖 Generated with Claude Code

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>
@diegopereira90 diegopereira90 changed the title feat(webhook)!: per-instruction beneficiary event payload feat(webhook): per-instruction beneficiary event payload Apr 30, 2026
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tracefinance 🟢 Ready View Preview Apr 30, 2026, 3:03 PM

💡 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>
Reverts the file added in af64ecf. Out of scope for this PR — its
purpose is the webhook event payload shape change in fx-webhook.
@diegopereira90 diegopereira90 merged commit 0545613 into main Apr 30, 2026
9 checks passed
@diegopereira90 diegopereira90 deleted the feat/beneficiary-payment-instruction-event branch April 30, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants