Wallet Addresses
Crypto must be sent to (on-ramp) or withdrawn from (off-ramp) a wallet address. There are two ways to provide wallet addresses for ramp transactions.
Option 1: Pass Directly in the Request
Include walletAddress as a parameter in any checkout or quote request. This is the simplest approach.
{
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18"
}
Option 2: Use Merchant Default Wallets
Configure your wallet addresses in the merchant dashboard under Settings > Financial Info > Crypto Wallets. Then pass a sessionId in your request — ZenPays will automatically use your configured wallet for the target network.
Supported networks:
| Network | Description |
|---|---|
ethereum | Ethereum mainnet (ERC-20) |
polygon | Polygon (MATIC) |
arbitrum | Arbitrum One |
base | Base |
optimism | Optimism |
bnb | BNB Chain |
avalanche | Avalanche C-Chain |
tip
If you pass walletAddress directly, it always takes priority over merchant defaults.
Where It Applies
| Endpoint | Wallet Behavior |
|---|---|
GET /on-ramp/quotes | Optional -- improves quote accuracy when provided |
GET /on-ramp/rates | Optional |
GET /on-ramp/prices | Optional |
POST /on-ramp/checkout | Required -- pass directly or use merchant defaults |
POST /on-ramp/widget-url | Optional -- embedded in signed widget URL |
GET /off-ramp/quotes | Optional |
GET /off-ramp/rates | Optional |
POST /off-ramp/checkout | Required -- pass directly or use merchant defaults |
POST /off-ramp/widget-url | Optional |
Examples
- cURL
- JavaScript
- Python
# Explicit wallet address
curl -X POST https://api.zenpayz.com/payment/api/v1/on-ramp/checkout \
-H "Content-Type: application/json" \
-d '{
"onramp": "moonpay",
"source": "usd",
"destination": "eth_ethereum",
"amount": 100,
"type": "buy",
"paymentMethod": "creditcard",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18"
}'
# Using merchant default wallet
curl -X POST https://api.zenpayz.com/payment/api/v1/on-ramp/checkout \
-H "Content-Type: application/json" \
-d '{
"onramp": "moonpay",
"source": "usd",
"destination": "eth_ethereum",
"amount": 100,
"type": "buy",
"paymentMethod": "creditcard",
"sessionId": "cs_abc123",
"network": "ethereum"
}'
// Explicit wallet
const result = await fetch('https://api.zenpayz.com/payment/api/v1/on-ramp/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
onramp: 'moonpay',
source: 'usd',
destination: 'eth_ethereum',
amount: 100,
type: 'buy',
paymentMethod: 'creditcard',
walletAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18',
}),
});
// Using merchant default wallet
const result2 = await fetch('https://api.zenpayz.com/payment/api/v1/on-ramp/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
onramp: 'moonpay',
source: 'usd',
destination: 'eth_ethereum',
amount: 100,
type: 'buy',
paymentMethod: 'creditcard',
sessionId: 'cs_abc123',
network: 'ethereum',
}),
});
import requests
# Explicit wallet
response = requests.post(
"https://api.zenpayz.com/payment/api/v1/on-ramp/checkout",
json={
"onramp": "moonpay",
"source": "usd",
"destination": "eth_ethereum",
"amount": 100,
"type": "buy",
"paymentMethod": "creditcard",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
},
)
# Using merchant default wallet
response2 = requests.post(
"https://api.zenpayz.com/payment/api/v1/on-ramp/checkout",
json={
"onramp": "moonpay",
"source": "usd",
"destination": "eth_ethereum",
"amount": 100,
"type": "buy",
"paymentMethod": "creditcard",
"sessionId": "cs_abc123",
"network": "ethereum",
},
)
Next Steps
- Buy Checkout -- Create a buy checkout intent
- Sell Checkout -- Create a sell checkout intent
- Widget URL -- Generate a signed widget URL