Get Payment Methods
Returns payment methods available for a given source currency.
GET
https://api.zenpayz.com/payment/api/v1/on-ramp/payment-methods/:sourceBearer · API key
Request
Headers
| Header | Description |
|---|---|
x-request-id OPTIONAL | Custom request ID for tracing |
Public Endpoint
This endpoint does not require authentication headers.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
source REQUIRED | string | Source currency ID (e.g. usd, eur) |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
type OPTIONAL | string | buy or sell |
destination OPTIONAL | string | Destination currency ID |
country OPTIONAL | string | ISO country code |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"id": "creditcard",
"name": "Credit Card",
"icon": "https://...",
"currencyStatus": "available"
},
{
"id": "debitcard",
"name": "Debit Card"
},
{
"id": "banktransfer",
"name": "Bank Transfer"
}
],
"message": "Payment methods retrieved"
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| RAMP_PAYMENT_METHODS_FAILED | 500 | Failed to get payment methods |
Examples
- cURL
- JavaScript
- Python
curl "https://api.zenpayz.com/payment/api/v1/on-ramp/payment-methods/usd?type=buy&country=US"
const response = await fetch(
'https://api.zenpayz.com/payment/api/v1/on-ramp/payment-methods/usd?type=buy&country=US'
);
const { data } = await response.json();
console.log(data); // [{ id: "creditcard", name: "Credit Card" }, ...]
import requests
response = requests.get(
"https://api.zenpayz.com/payment/api/v1/on-ramp/payment-methods/usd",
params={"type": "buy", "country": "US"},
)
methods = response.json()["data"]
Next Steps
- Buy Quotes -- Get quotes with a specific payment method
- Defaults -- Get recommended defaults per country