Earn is an Enterprise feature. Reach out to [email protected] to request
access.
Prerequisites
- A Privy app with embedded wallets configured
- API credentials (your app ID and app secret)
- A webhook endpoint registered in the Privy Dashboard (recommended)
1. Deploy a fee vault
Configure a fee vault from the Wallet infrastructure > Earn page in the Privy Dashboard. During setup, you will set:- A Morpho vault to allocate assets into
- The percentage of generated yield your app receives
- An admin wallet to claim fees and manage your vault configuration
Using an external wallet as an admin wallet (advanced)
Using an external wallet as an admin wallet (advanced)
If the admin wallet is not a Privy embedded wallet, it must be able to sign onchain transactions
to manage the vault and claim fees. Exchange wallets, cold storage, and other non-signing
wallets are not supported. Once set, Privy cannot reassign the admin wallet.
Updating your fee vault configuration (advanced)
Updating your fee vault configuration (advanced)
Privy assigns all fee vault roles to the admin wallet. This ensures that developers can update
their fee vault configurations in the future. Learn more about fee vault roles
here. Reach out to
[email protected] to make fee vault configuration changes.
2. Copy the vault ID
After setup, Privy provides a uniquevault_id for the vault. Copy this value — it is required for all deposit and withdraw API calls.
To verify the vault is live, query its details with the get vault details endpoint:
Example response
3. Deposit funds into the vault
Wallets with
owner_id present must provide an authorization
signature as a request header for deposit, withdraw, and
claim operations.asset_amount is specified in the token’s smallest unit. For USDC (6 decimals), "1000000"
equals 1 USDC.id and a status of "pending". Poll the status with get sweep by ID, or listen for the yield.deposit.confirmed webhook to know when the deposit is confirmed onchain.
Example response
4. Check a wallet’s position
After a deposit is confirmed, query the wallet’s holdings using the get position endpoint. Theassets_in_vault field reflects the current redeemable value, including any accrued yield.
Example response
5. Withdraw funds from the vault
Redeem vault shares and return assets — plus any accrued yield — to the wallet using the withdraw endpoint. The returnedasset_amount reflects the original deposit plus yield earned.
yield.withdraw.confirmed webhook.
Example response
6. Claim reward incentives
Some vaults distribute additional token incentives on top of base yield. Collect these with the claim endpoint. Claims operate at the chain level — pass a CAIP-2 identifier rather than a vault ID. For apps with multiple vaults on the same chain, a single claim collects rewards across all vaults.yield.claim.confirmed webhook.
Example response
Claiming rewards is separate from withdrawing yield. To realize deposit earnings, use the
withdraw endpoint. Claiming does not affect withdrawals
or ongoing earnings.
7. Track activity with webhooks (recommended)
Privy emits webhooks when vault operations are confirmed onchain. Subscribe to earn events from the Configuration > Webhooks page in the Privy Dashboard to keep your app synchronized without polling.| Event | Fired when |
|---|---|
yield.deposit.confirmed | A vault deposit is confirmed onchain |
yield.withdraw.confirmed | A vault withdrawal is confirmed onchain |
yield.claim.confirmed | A reward claim transaction is confirmed onchain |
For full webhook setup instructions and payload schemas, see the webhooks
overview.

