Withdraw from Credit Wallet
Wallet
Withdraw from Credit Wallet
Initiate a withdrawal from credit wallet to external wallet address
POST
Withdraw from Credit Wallet
Overview
This endpoint initiates a withdrawal from the authenticated user’s credit wallet to their registered external wallet address. The withdrawal is processed on-chain on the Linea network, and the net amount received equals the requested amount minus network gas fees. Prerequisites:- User must have a registered external wallet (completed delegation flow)
- Credit wallet must have sufficient balance to cover withdrawal amount + fees
- User must be verified and in good standing
- Check available balance with
GET /v1/wallet/credit - Estimate fees with
GET /v1/wallet/credit/withdraw-estimation - Initiate withdrawal with this endpoint
- Monitor transaction on blockchain using returned
txHash - Verify completion with
GET /v1/wallet/history
Authentication
Your public API client key that identifies your environment
Bearer token obtained from OAuth flow or direct login
Query Parameters
Set to
true to route request to US backend environment (if available for your client)Request Body
Amount to withdraw in USDC (decimal string). Must not exceed available balance.
Response
Blockchain transaction hash of the withdrawal. Use this to track transaction status on the Linea network.
Code Examples
Complete Withdrawal Flow
Important Notes
Network Fees: Fees are deducted from the withdrawal amount. If withdrawing 10 USDC with 0.02 USDC fee, user receives 9.98 USDC.
Error Handling
Common Errors
Insufficient BalanceGET /v1/wallet/credit and ensure amount + fees < balance.
No External Wallet
isWithdrawable flag on GET /v1/wallet/credit before attempting withdrawal.
Edge Cases
Minimum Withdrawal Amounts
Gas fees make very small withdrawals uneconomical:Concurrent Withdrawals
Only one withdrawal can be processed at a time per wallet:Network Congestion
During high traffic, transactions may take longer:- Implement retry logic with exponential backoff
- Display estimated confirmation time to users
- Consider queuing withdrawals for later processing
Related Endpoints
- Estimate Credit Withdrawal Fees - Calculate fees before withdrawal
- Get Credit Wallet Balance - Check available balance
- Get External Wallets - View registered withdrawal destinations
- Get Wallet History - Verify withdrawal completion