curl --request GET \
--url https://api-dashboard.payra.com/v1/payment-methods/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payment-methods/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dashboard.payra.com/v1/payment-methods/{id}', 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-dashboard.payra.com/v1/payment-methods/{id}",
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-dashboard.payra.com/v1/payment-methods/{id}"
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-dashboard.payra.com/v1/payment-methods/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payment-methods/{id}")
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{
"object": "payment_method",
"id": "pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf",
"type": "card",
"usage": "saved",
"status": "active",
"customer": null,
"session": "pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"card": {
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2030,
"funding": "credit",
"wallet": null
},
"us_bank_account": null,
"acss_debit": null,
"billing_details": {
"name": "Ada Lovelace",
"postal_code": "94110"
},
"next_action": null,
"failure": null,
"livemode": false,
"expires_at": null,
"created_at": "2026-09-18T14:00:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Retrieve a payment method
The current state of one of your payment methods.
curl --request GET \
--url https://api-dashboard.payra.com/v1/payment-methods/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payment-methods/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dashboard.payra.com/v1/payment-methods/{id}', 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-dashboard.payra.com/v1/payment-methods/{id}",
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-dashboard.payra.com/v1/payment-methods/{id}"
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-dashboard.payra.com/v1/payment-methods/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payment-methods/{id}")
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{
"object": "payment_method",
"id": "pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf",
"type": "card",
"usage": "saved",
"status": "active",
"customer": null,
"session": "pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"card": {
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2030,
"funding": "credit",
"wallet": null
},
"us_bank_account": null,
"acss_debit": null,
"billing_details": {
"name": "Ada Lovelace",
"postal_code": "94110"
},
"next_action": null,
"failure": null,
"livemode": false,
"expires_at": null,
"created_at": "2026-09-18T14:00:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
A secret key, sk_test_... or sk_live_...; a publishable key (pk_...) on the browser routes only
Path Parameters
1 - 64Response
The payment method
payment_method "pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf"
card, us_bank_account, acss_debit "card"
saved when the session named a customer: the instrument is vaulted and stays on their file. one_time otherwise: chargeable once, before expires_at.
one_time, saved "saved"
active can be charged. consumed: a one-time method already charged. expired: a one-time method past expires_at. detached: removed from the customer's file. requires_action while a card being saved waits on the cardholder's bank (3-D Secure), as next_action says; it then turns active, or failed when nothing was saved (see failure). A method only reads requires_action when its create sent return_url or use_payra_js. A saved method stays active, and chargeable with the details it has, while new details for its card wait on the bank.
active, consumed, expired, detached, requires_action, failed "active"
null
The session the card or account was collected in; for bank details your server sent, the session Payra made for them.
"pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd"
Set when type is card.
Show child attributes
Show child attributes
Set when type is us_bank_account.
Show child attributes
Show child attributes
null
Set when type is acss_debit.
Show child attributes
Show child attributes
null
Show child attributes
Show child attributes
Set while the cardholder's bank wants to authenticate the card before it is saved: on a method that reads requires_action, and on an active saved method your create answered with 200 for a card collected again with a new expiry, name or postal code, which takes those once the step is done and keeps the ones it has if it is not. redirect, when the create sent return_url: send the cardholder to url, a Payra page; they come back to your return_url with ?payment_method=. three_ds_fingerprint and three_ds_challenge, when it sent use_payra_js: Payra Elements runs the step on your page in handleNextAction. Null otherwise.
Show child attributes
Show child attributes
null
Set when status is failed: why the card was not saved. card_authentication_failed: the bank did not authenticate the cardholder, or they closed or left its step. card_verification_failed: the processor refused the card after the bank authenticated it. processing_error: anything else. message is Payra's own sentence. Collect the card again with a new session to retry.
Show child attributes
Show child attributes
null
false
Set on a one-time method.
null
"2026-09-18T14:00:00.000Z"