How it works
1. Initiation
Platform A initiates a settlement with their own party details inline and specifies counterparty platforms by slug:wallet_address_hint and counterparty_reference are optional hints that help Platform B identify which entity to assign.
2. Counterparty notification
KeyStone creates the counterparty party as a placeholder (status: pending_confirmation) and sends a settlement.confirmation_required webhook to Platform B.
3. Confirmation
Platform B reviews the settlement details and confirms with their party details:4. Settlement proceeds
Once all parties confirm, the engine resumes and processes the settlement through the normal state machine (compliance, escrow, execution).5. Rejection
Platform B can reject instead:Identity model
KeyStone does not maintain a global identity registry. The confirmation flow IS the identity linking mechanism:- Platform A optionally provides hints (wallet address, entity reference)
- Platform B uses those hints to find the right entity (or ignores them)
- Platform B confirms with their actual party details
- KeyStone doesn’t need to know who’s who across platforms
Authorization boundary
Each platform authenticates with its own M2M token. When Platform B calls/confirm, KeyStone verifies:
- Platform B’s token is valid
- Platform B has a
pending_confirmationparty in this settlement - The confirmation is scoped to Platform B’s environment
Webhook delivery
In cross-platform settlements, webhooks are delivered to ALL involved platforms, not just the initiator. Every state change is pushed to every platform that has a party in the settlement.Idempotency
- Confirming an already-confirmed party returns 200 (safe to retry)
- Rejecting an already-rejected settlement returns 200 (safe to retry)
- Confirming after rejection returns 409 (conflict, not a retry)
- Rejecting after confirmation returns 409 (conflict, not a retry)