Get Ramp Config
Returns the current ramp configuration including integration mode and supported directions.
GET
https://api.zenpayz.com/payment/api/v1/on-ramp/configBearer · API key
Request
Headers
| Header | Description |
|---|---|
x-request-id OPTIONAL | Custom request ID for tracing |
Public Endpoint
This endpoint does not require authentication headers.
Response
Success (200 OK)
{
"success": true,
"data": {
"integrationMode": "api",
"supportsBuy": true,
"supportsSell": true,
"widgetBaseUrl": "https://buy.onramper.com"
},
"message": "Config retrieved"
}
Response Fields
| Parameter | Type | Description |
|---|---|---|
integrationMode OPTIONAL | string | widget, api, or both |
supportsBuy OPTIONAL | boolean | Whether on-ramp (fiat to crypto) is enabled |
supportsSell OPTIONAL | boolean | Whether off-ramp (crypto to fiat) is enabled |
widgetBaseUrl OPTIONAL | string | Base URL for the embeddable widget |
Error Responses
| Code | HTTP | Message |
|---|---|---|
| RAMP_CONFIG_FAILED | 500 | Failed to retrieve configuration |
Examples
- cURL
- JavaScript
- Python
curl https://api.zenpayz.com/payment/api/v1/on-ramp/config
const response = await fetch('https://api.zenpayz.com/payment/api/v1/on-ramp/config');
const { data } = await response.json();
console.log(data.integrationMode); // "api"
console.log(data.supportsBuy); // true
import requests
response = requests.get("https://api.zenpayz.com/payment/api/v1/on-ramp/config")
data = response.json()["data"]
print(data["integrationMode"]) # "api"
print(data["supportsBuy"]) # True
Next Steps
- Supported Assets -- Get available currencies
- Buy Quotes -- Get buy quotes
- Widget URL -- Generate a widget URL