Documentation Index
Fetch the complete documentation index at: https://docs.payviox.com/llms.txt
Use this file to discover all available pages before exploring further.
Retrieves available payment methods, optionally filtered by currency and country.
async getPaymentsMethods(
parameters?: PaymentMethodsFilters
): Promise<PaymentMethod[]>
Parameters
Optional filters to narrow down payment methods.Show PaymentMethodsFilters properties
Filter by currency code(s).currencies: 'USD'
// or
currencies: ['USD', 'EUR', 'GBP']
Filter by country code(s) (ISO 3166-1 alpha-2).countries: 'FR'
// or
countries: ['FR', 'DE', 'ES']
Return value
Promise that resolves to an array of available payment methods.interface PaymentMethod {
id: string;
name: string;
type: string;
currencies: string[];
countries: string[];
}
Examples
const payviox = new Payviox('your_api_token');
const methods = await payviox.getPaymentsMethods();
console.log('Available payment methods:', methods);
Error handling
try {
const methods = await payviox.getPaymentsMethods();
if (methods.length === 0) {
console.warn('No payment methods available');
}
} catch (error) {
console.error('Failed to fetch payment methods:', error);
}