Overview
This guide walks you through enabling users to move cash in and out of Wealthyhood: link a bank account for ownership verification, register and track deposits, and withdraw back to the bank.All endpoints require an M2M bearer token and the
x-user-id header to scope operations to the acting user.Prerequisites
- API access and M2M credentials
x-user-idvalue for the target user
1) Link a bank account
Before users can deposit funds, they must link a bank account. This is required to verify account ownership and match incoming payments to the correct user. UsePOST /bank-accounts to register a bank account for the user.
2) Create and track payments
Before the user sends a bank transfer, register a deposit expectation withPOST /deposits/expectations,
including a unique payment reference (e.g. wallet-topup-${crypto.randomUUID()}). Have the user include
that same reference in their bank transfer so it can be reconciled automatically.
cURL
GET /deposits with the bankReference query parameter to detect
the matching deposit record:
status, allowing you to monitor when the funds become available to the user.
3) Withdraw funds
UsePOST /withdrawals to send funds back to the user’s bank account.