Skip to content

Fiat accounts a customer also uses on UNIGOX: spendable, reserved and held (unreleased) - #107

Merged
hallstain merged 3 commits into
mainfrom
docs/shared-fiat-account-balance
Dec 1, 2026
Merged

hallstain merged 3 commits into
mainfrom
docs/shared-fiat-account-balance

Conversation

@grape404

@grape404 grape404 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What this documents

A customer who is verified with a partner and with UNIGOX will be able to use the same EUR fiat account from their UNIGOX wallet. One balance then serves both sides, so the partner has to know how much of it is already promised to something.

Until now the published guide said that available is what can be spent, and it did not mention a reserved amount at all.

Changes

  • fiat-accounts.md: new section "When the customer also uses the account on UNIGOX".
    • The EUR balance line of a shared account adds spendable, reserved and held, which together equal available. Example included.
    • What reserved covers: a deposit matched to an open order that the order has not taken yet, the proceeds of a UNIGOX sale on their way to the customer's bank, a payment the bank has not booked yet.
    • pay-from-balance is limited by spendable. An amount above it is refused whole with 422 INSUFFICIENT_BALANCE.
    • The new fiat_account.balance.changed event, which carries no amount and says when to read the account again.
    • Movements the customer makes on UNIGOX are not listed in transactions.
    • An account that is not shared carries none of the new fields and does not change.
  • The existing pay-from-balance text and its INSUFFICIENT_BALANCE row now name the balance that can be spent, with a pointer to the new section.
  • changelog.md: entry under Unreleased, linked to that section.
  • openapi/swagger.yaml: held, reserved and spendable on FiatBalance, the pay-from-balance wording, and the new event in the webhook list.

Release

Not live yet. The new section opens with the "Not available yet" notice and the changelog entry is under Unreleased, as the README asks.

Merge this last, after the services behind the change are deployed. In that push, replace Unreleased with the release date and remove the notice.

Checks

  • node --test scripts/*.test.mjs: 27 of 27 pass.
  • node scripts/check-release.mjs stops only on the Unreleased heading, the same as on main. It does not complain about the new section, so the notice and the anchor are in place.
  • The specification still parses, and the example in FiatBalance adds up.
  • Every statement was checked against the service code that produces the fields, the refusal and the event.

🤖 Generated with Claude Code

grape404 and others added 3 commits December 1, 2026 15:31
…ses on UNIGOX (unreleased)

A customer who is verified with a partner and with UNIGOX will be able to use
the same EUR account from their UNIGOX wallet. One balance then serves both
sides, so the partner needs to know how much of it is already promised.

- fiat-accounts.md: new section "When the customer also uses the account on
  UNIGOX" with the three added balance fields, an example, the rule that
  pay-from-balance is limited by spendable and refused whole above it, and the
  new fiat_account.balance.changed event. It opens with the "Not available yet"
  notice. The pay-from-balance text and its INSUFFICIENT_BALANCE row now name
  the balance that can be spent.
- changelog.md: entry under Unreleased, linked to that section.
- openapi/swagger.yaml: held, reserved and spendable on FiatBalance, the
  pay-from-balance wording, and the new event in the webhook list.

Merge last, after the services are live. On that day replace Unreleased with
the date and remove the notice.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@hallstain
hallstain merged commit b66e16e into main Dec 1, 2026
1 check passed
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