Get Defaults
Returns recommended default currencies, amounts, and payment methods per country.
GET
https://api.zenpayz.com/payment/api/v1/on-ramp/defaultsBearer · API key
Request
Headers
| Header | Description |
|---|---|
x-request-id OPTIONAL | Custom request ID for tracing |
Public Endpoint
This endpoint does not require authentication headers.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
type OPTIONAL | string | buy or sell (default: buy) |
country OPTIONAL | string | ISO country code (e.g. US) |
Response
Success (200 OK)
{
"success": true,
"data": {
"message": {
"recommended": {
"amount": 300,
"paymentMethod": "debitcard",
"source": "USD",
"target": "BTC",
"country": "us"
},
"defaults": {
"us": {
"amount": 300,
"paymentMethod": "debitcard",
"source": "USD",
"target": "BTC"
}
}
}
},
"message": "Defaults retrieved"
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| RAMP_DEFAULTS_FAILED | 500 | Failed to get defaults |
Examples
- cURL
- JavaScript
- Python
curl "https://api.zenpayz.com/payment/api/v1/on-ramp/defaults?type=buy&country=US"
const response = await fetch(
'https://api.zenpayz.com/payment/api/v1/on-ramp/defaults?type=buy&country=US'
);
const { data } = await response.json();
const { amount, paymentMethod, source, target } = data.message.recommended;
console.log(`Default: ${amount} ${source} → ${target} via ${paymentMethod}`);
import requests
response = requests.get(
"https://api.zenpayz.com/payment/api/v1/on-ramp/defaults",
params={"type": "buy", "country": "US"},
)
recommended = response.json()["data"]["message"]["recommended"]
print(f"Default: {recommended['amount']} {recommended['source']} → {recommended['target']}")
Next Steps
- Buy Quotes -- Get quotes using these defaults
- Supported Assets -- See all available currencies