Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve available payment methods
async getPaymentsMethods( parameters?: PaymentMethodsFilters ): Promise<PaymentMethod[]>
Show PaymentMethodsFilters properties
currencies: 'USD' // or currencies: ['USD', 'EUR', 'GBP']
countries: 'FR' // or countries: ['FR', 'DE', 'ES']
interface PaymentMethod { id: string; name: string; type: string; currencies: string[]; countries: string[]; }
const payviox = new Payviox('your_api_token'); const methods = await payviox.getPaymentsMethods(); console.log('Available payment methods:', methods);
const payviox = new Payviox('your_api_token'); const methods = await payviox.getPaymentsMethods({ currencies: 'USD' }); console.log('USD payment methods:', methods);
const payviox = new Payviox('your_api_token'); const methods = await payviox.getPaymentsMethods({ currencies: ['USD', 'EUR'], countries: ['FR', 'DE'] }); console.log('Filtered methods:', methods);
const payviox = new Payviox('your_api_token'); const methods = await payviox.getPaymentsMethods({ currencies: 'USD' }); const container = document.getElementById('payment-methods'); methods.forEach(method => { container.innerHTML += ` <div class="payment-method"> <h3>${method.name}</h3> <p>Type: ${method.type}</p> <p>ID: ${method.id}</p> </div> `; });
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); }