List saved payment methods
curl --request GET \
--url https://api.sandbox.nevermined.app/api/v1/payment-methods \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.nevermined.app/api/v1/payment-methods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.nevermined.app/api/v1/payment-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.sandbox.nevermined.app/api/v1/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox.nevermined.app/api/v1/payment-methods"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.nevermined.app/api/v1/payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/payment-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "pm_1Abc2Def3Ghi4Jkl",
"type": "card",
"last4": "4242",
"brand": "visa",
"expMonth": 12,
"expYear": 2027,
"alias": "My Card",
"provider": "stripe",
"status": "Active",
"allowedApiKeyIds": [
"sk-abc123",
"sk-def456"
],
"orgId": "<string>"
}
]Payment Methods
List Payment Methods
Returns the saved payment methods for the authenticated user. Requires a Nevermined API key.
GET
/
payment-methods
List saved payment methods
curl --request GET \
--url https://api.sandbox.nevermined.app/api/v1/payment-methods \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.nevermined.app/api/v1/payment-methods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.nevermined.app/api/v1/payment-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.sandbox.nevermined.app/api/v1/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox.nevermined.app/api/v1/payment-methods"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.nevermined.app/api/v1/payment-methods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/payment-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "pm_1Abc2Def3Ghi4Jkl",
"type": "card",
"last4": "4242",
"brand": "visa",
"expMonth": 12,
"expYear": 2027,
"alias": "My Card",
"provider": "stripe",
"status": "Active",
"allowedApiKeyIds": [
"sk-abc123",
"sk-def456"
],
"orgId": "<string>"
}
]Authorizations
Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.
Query Parameters
When "true", return only payment methods accessible to the requesting API key (filters by allowedApiKeyIds and Active status).
Available options:
true, false When set, return only payment methods backed by this provider. Omit to return methods from every provider (default).
Available options:
stripe, braintree, erc4337, visa, vgs Response
List of saved payment methods
Example:
"pm_1Abc2Def3Ghi4Jkl"
Example:
"card"
Example:
"4242"
Example:
"visa"
Example:
12
Example:
2027
Example:
"My Card"
Available options:
stripe, braintree, erc4337, visa, vgs Example:
"stripe"
Available options:
Active, Revoked Example:
"Active"
NVM API Key IDs allowed to use this card. Null = any key can use it.
Example:
["sk-abc123", "sk-def456"]
Organization this card belongs to (null = personal).
Was this page helpful?