feat(webhook): publish OPERATION_COMPLETED and OPERATION_FAILED#21
Merged
marioalvial merged 2 commits intomainfrom May 6, 2026
Merged
feat(webhook): publish OPERATION_COMPLETED and OPERATION_FAILED#21marioalvial merged 2 commits intomainfrom
marioalvial merged 2 commits intomainfrom
Conversation
Add webhook events for terminal operation transitions, sharing the
OperationEvent payload shape with OPERATION_REQUESTED. Use
currentState.status to distinguish outcomes; reason is populated on
FAILED.
Intermediate statuses (PROCESSING, ON_HOLD, ACTION_REQUIRED) remain
poll-only via GET /api/operations/{operationId}. Journey pages and
webhooks overview updated to push subscribing to terminal events
first and only fall back to polling for intermediate statuses.
The spec exposed the account event as ACCOUNT_ASSET_ACTIVATED, but the live producer publishes it as ASSET_ACTIVATED — fx-account Constants.kt defines const ASSET_ACTIVATED = "ASSET_ACTIVATED" and emits it via that exact string. The ACCOUNT_ prefix was never on the wire. Renames the EventType enum entry, the webhooks path key, the page title, and the webhooks overview reference. The MDX filename and URL slug stay as-is (already in URL-friendly short form).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
leoneparise
approved these changes
May 6, 2026
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.
Description
Add webhook events for terminal operation transitions.
OPERATION_COMPLETEDandOPERATION_FAILEDdeliver the sameOperationEventpayload asOPERATION_REQUESTED, withcurrentState.statusset to the new status (andcurrentState.reasonpopulated on failure). This lets integrators react to the terminal outcome via webhooks instead of polling.While here, also corrects the published name of the account event from
ACCOUNT_ASSET_ACTIVATEDtoASSET_ACTIVATED— the spec invented anACCOUNT_prefix that is not on the wire (live producer infx-account/Constants.ktdefinesconst val ASSET_ACTIVATED = "ASSET_ACTIVATED").Key Changes
apis/fx-webhook/openapi.yml:EventTypeenum: +OPERATION_COMPLETED,OPERATION_FAILEDOperationEvent: rewrote description,customerIdis nowformat: uuidwith example, added requiredcurrentStatefieldOperationStatus,Reason,OperationState(matches Kotlin source + fx-payment spec naming)OPERATION_COMPLETED,OPERATION_FAILED— both referenceOperationEventACCOUNT_ASSET_ACTIVATED→ASSET_ACTIVATED(enum entry + path key)api-reference/fx-webhook/events/operation/operation-completed.mdx,operation-failed.mdxdocs.json: both new pages added under Operationwebhooks/overview.mdx: Operation row now lists 3 events; Note rewritten to scope poll-vs-webhook clearly per resourcejourneys/{deposit,swap,transfer,withdrawal}.mdx: tracking step rewritten to push subscribing to terminal events firstapi-reference/fx-webhook/events/account/asset-activated.mdx: title and openapi reference updated toASSET_ACTIVATEDType of change
How Has This Been Tested?
mint validateandmint broken-linksboth pass locally.Checklist:
Backend follow-ups
The live
fx-paymentOperationEventdoes not yet carrycurrentState, andOperationProducerAdapteronly emitsREQUESTED/ACTION_EXECUTEDtoday —OPERATION_COMPLETED/OPERATION_FAILEDare documented aspirationally per repo policy and need a producer change to go live.