Guides
This guide describes how investments work in Investhub: creating an investment, payment methods, and the main API flow.
Overview
Users invest in opportunities (e.g. tokenized offerings) by creating an investment record and then completing payment. Payment can be crypto (wallet), card (Stripe), bank (Volt, Monerium, etc.), or other configured methods.
Create investment flow
Client calls
create-investmentwith amount, token details, payment method, and (for crypto) network and wallet.Backend validates the user (Privy JWT), opportunity, and spending caps; creates the investment record; and returns success or an error (e.g. 402 if sponsorship credits are required and insufficient).
For crypto: client may then call
pay-investmentorprocess-crypto-paymentto execute the on-chain payment.For card/bank: the client follows the returned payment link or session (e.g. Stripe Checkout, Monerium).
Payment method flow (flowchart example)
Another way to visualize the flow is with a flowchart showing how the backend routes by payment method:
Main endpoints
create-investment
Create an investment (auth required). Body: privy_user_id, opportunityId, amount, tokenAmount, tokenSymbol, tokenPrice, currency, paymentMethod, network, optional walletAddress, etc.
pay-investment
Complete payment for an existing investment (e.g. crypto).
process-crypto-payment
Process a crypto payment (e.g. MetaMask).
get-user-investments
List investments for the authenticated user.
sponsored-transaction
Request a sponsored (gasless) transaction; returns 402 if sponsorship credits are insufficient.
Screenshots
Below is an example of how a screenshot appears in the docs. Replace this with a real capture from the app (or use CI/Playwright to generate it).
Last updated