Get Payment Methods
curl --request GET \
--url https://api.payviox.com/payments/methodsimport requests
url = "https://api.payviox.com/payments/methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.payviox.com/payments/methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.payviox.com/payments/methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.payviox.com/payments/methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.payviox.com/payments/methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payviox.com/payments/methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"stripe_credit": {
"countries": null,
"currencies": null,
"fees": {
"static_fees": 0.30,
"percent_fees": 0.029
},
"name": "Credit Card (Stripe)",
"image": "https://cdn.payviox.com/images/stripe.png"
},
"nicepay_pix": {
"countries": ["BR"],
"currencies": ["BRL", "USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.015
},
"name": "PIX (Nicepay)",
"image": "https://cdn.payviox.com/images/pix.png"
},
"zen_usdt": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "USDT (Zen)",
"image": "https://cdn.payviox.com/images/usdt.png"
},
"cryptocom_btc": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "Bitcoin (Crypto.com)",
"image": "https://cdn.payviox.com/images/bitcoin.png"
}
}
{
"error": "Unauthorized"
}
API - Endpoints
Get Payment Methods
Retrieve available payment methods for your business
GET
/
payments
/
methods
Get Payment Methods
curl --request GET \
--url https://api.payviox.com/payments/methodsimport requests
url = "https://api.payviox.com/payments/methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.payviox.com/payments/methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.payviox.com/payments/methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.payviox.com/payments/methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.payviox.com/payments/methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payviox.com/payments/methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"stripe_credit": {
"countries": null,
"currencies": null,
"fees": {
"static_fees": 0.30,
"percent_fees": 0.029
},
"name": "Credit Card (Stripe)",
"image": "https://cdn.payviox.com/images/stripe.png"
},
"nicepay_pix": {
"countries": ["BR"],
"currencies": ["BRL", "USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.015
},
"name": "PIX (Nicepay)",
"image": "https://cdn.payviox.com/images/pix.png"
},
"zen_usdt": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "USDT (Zen)",
"image": "https://cdn.payviox.com/images/usdt.png"
},
"cryptocom_btc": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "Bitcoin (Crypto.com)",
"image": "https://cdn.payviox.com/images/bitcoin.png"
}
}
{
"error": "Unauthorized"
}
Overview
Returns a list of all available payment methods configured for your business, filtered by country and currency restrictions.This endpoint returns only active payment methods that match the specified filters.
Authentication
This endpoint requires API key authentication. See Authentication for details.Authorization: Bearer YOUR_API_KEY
Query Parameters
string
Comma-separated list of ISO 3166-1 alpha-2 country codes to filter payment methods by availability.Example:
US,GB,FRMaximum: 200 countriesstring
Comma-separated list of three-letter ISO currency codes to filter payment methods.Example:
USD,EUR,GBPMaximum: 200 currenciesboolean
Set to
true to get payment methods for business customers with adjusted fees.Default: falseResponse
Returns an object where each key is a payment method ID and the value contains the payment method details.object
Show Payment Method Object
Show Payment Method Object
string
Display name of the payment method
string
URL to the payment method logo/image
array
Array of country codes where this payment method is available. If null or empty, available globally.
array
Array of currency codes supported by this payment method. If null or empty, all currencies are supported.
Example Request
curl https://api.payviox.com/payments/methods?countries=US,GB¤cies=USD \
-H "Authorization: Bearer YOUR_API_KEY"
const params = new URLSearchParams({
countries: 'US,GB',
currencies: 'USD'
});
const response = await fetch(
`https://api.payviox.com/payments/methods?${params}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const paymentMethods = await response.json();
console.log(paymentMethods);
import requests
url = 'https://api.payviox.com/payments/methods'
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
params = {
'countries': 'US,GB',
'currencies': 'USD'
}
response = requests.get(url, headers=headers, params=params)
payment_methods = response.json()
print(payment_methods)
<?php
$apiKey = 'YOUR_API_KEY';
$params = http_build_query([
'countries' => 'US,GB',
'currencies' => 'USD'
]);
$url = 'https://api.payviox.com/payments/methods?' . $params;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$paymentMethods = json_decode($response, true);
print_r($paymentMethods);
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.payviox.com/payments/methods')
uri.query = URI.encode_www_form({
countries: 'US,GB',
currencies: 'USD'
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer YOUR_API_KEY'
response = http.request(request)
payment_methods = JSON.parse(response.body)
puts payment_methods
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.payviox.com/payments/methods?countries=US,GB¤cies=USD"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var paymentMethods map[string]interface{}
json.NewDecoder(resp.Body).Decode(&paymentMethods)
fmt.Println(paymentMethods)
}
Example Response
{
"stripe_credit": {
"countries": null,
"currencies": null,
"fees": {
"static_fees": 0.30,
"percent_fees": 0.029
},
"name": "Credit Card (Stripe)",
"image": "https://cdn.payviox.com/images/stripe.png"
},
"nicepay_pix": {
"countries": ["BR"],
"currencies": ["BRL", "USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.015
},
"name": "PIX (Nicepay)",
"image": "https://cdn.payviox.com/images/pix.png"
},
"zen_usdt": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "USDT (Zen)",
"image": "https://cdn.payviox.com/images/usdt.png"
},
"cryptocom_btc": {
"countries": null,
"currencies": ["USD"],
"fees": {
"static_fees": 0,
"percent_fees": 0.01
},
"name": "Bitcoin (Crypto.com)",
"image": "https://cdn.payviox.com/images/bitcoin.png"
}
}
{
"error": "Unauthorized"
}
Error Responses
401 — Unauthorized
401 — Unauthorized
Returned when the API key is missing or invalid.How to resolve: Ensure you are sending a valid API key in the
Authorization: Bearer header. Both Public and Secret API keys are accepted.{
"error": "Unauthorized"
}
Understanding the Response
Global vs Regional Payment Methods
- Global methods have
nullor empty arrays forcountriesandcurrencies - Regional methods specify which countries and currencies they support
Fee Structure
Fees are calculated as:Total Fee = static_fees + (amount × percent_fees)
static_fees: 0.30 and percent_fees: 0.029:
Total Fee = $0.30 + ($100 × 0.029) = $0.30 + $2.90 = $3.20
Company vs Individual Fees
Whenis_company=true, some payment methods may have adjusted fee structures for business customers.
Use Cases
Display Payment Options
Show available payment methods to your customers before they start checkout
Dynamic Pricing
Calculate and display fees for each payment method
Geographic Filtering
Show only payment methods available in customer’s country
Currency Support
Filter methods based on your transaction currency
Filtering Logic
Country Filtering
Country Filtering
- If no countries parameter is provided, all payment methods are returned
- If countries are specified, only methods available in those countries are returned
- Methods with
nullcountries are always included (global availability)
Currency Filtering
Currency Filtering
- If no currencies parameter is provided, all payment methods are returned
- If currencies are specified, only methods supporting those currencies are returned
- Methods with
nullcurrencies are always included (all currencies supported)
Active Status
Active Status
- Only payment methods that are active in your business configuration are returned
- Methods must also have an active provider configuration
Best Practices
Cache Responsibly: Payment methods and fees can change. Cache the response for a short period (recommended: 5-15 minutes) and refresh regularly.
Show Relevant Methods: Always filter by the customer’s country and your transaction currency to show only relevant payment options.
Next Steps
Create Session
Create a payment session with a specific payment method
Configure Methods
Enable or configure payment methods in your dashboard