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"
],
"needsReactivation": true,
"cardId": "CRDs4FYUfwueGDryKrPDjd3JR",
"rails": [
"vgs",
"visa"
],
"orgId": "<string>"
}
]List Payment Methods
Returns the saved payment methods for the authenticated user. Requires a Nevermined API key.
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"
],
"needsReactivation": true,
"cardId": "CRDs4FYUfwueGDryKrPDjd3JR",
"rails": [
"vgs",
"visa"
],
"orgId": "<string>"
}
]Authorizations
Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Account → API keys.
Query Parameters
Response
List of saved payment methods
Present and true on an entry of an enrolled card whose card-on-file network token is no longer active: its holder can reactivate it in the Nevermined App. Absent too when that read fails, so its absence does not prove the token active. rails, not this flag, tells whether the card can pay now and through which rail.
The card’s CRD… card id, on an entry of a card enrolled with Nevermined (provider vgs or visa) whose card is known, and on an entry flagged needsReactivation. A card enrolled for card-on-file and Visa agentic payments is listed once per rail (or more), each entry with the same cardId: group entries by cardId, falling back to id. Absent on other entries. When the cards cannot be read it is absent too (a vgs entry without cardId is the sign; a retry can fix it), except on an entry flagged needsReactivation, which keeps it without rails. POST /delegation/create takes it as providerPaymentMethodId for a provider its rails lists. Only GET /payment-methods sets it: the PATCH /payment-methods/{paymentMethodId} response carries neither it nor rails.
"CRDs4FYUfwueGDryKrPDjd3JR"
Listed with cardId on an entry of a card enrolled with Nevermined: the delegation providers a new delegation naming the card by its cardId can pay through now — vgs (card on file; listed only while the card-on-file network token is active) and visa (Visa agentic). rails, not needsReactivation, tells whether the card can pay now. It describes the card, so the entry for a rail that was turned off still lists the card’s other rails. Empty when the card can pay through neither. Absent when the cards cannot be read, so on an entry with cardId a missing rails means unknown (retry) and [] means none. A vgs entry’s own id is the card’s CRD…, so naming it is the same request: refused BCK.DELEGATION.0005 while the card cannot pay card on file. A Revoked vgs or visa entry is refused. An Active visa entry’s own id (its agentic token) is accepted even when the entry carries no rails (its token is linked to no card, or the cards could not be read).
vgs, visa ["vgs", "visa"]
Was this page helpful?