curl --request GET \
--url https://api-dashboard.payra.com/v1/payment-method-sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payment-method-sessions/{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-method-sessions/{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-method-sessions/{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-method-sessions/{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-method-sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payment-method-sessions/{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_session",
"id": "pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"status": "requires_payment_method",
"customer": null,
"payment_method_types": [
"card"
],
"amount": null,
"currency": null,
"livemode": false,
"expires_at": "2026-09-17T18:30:00.000Z",
"canceled_at": null,
"succeeded_at": null,
"card": null,
"us_bank_account": null,
"ach_authorization": null,
"payment_method": null,
"created_at": "2026-09-17T18:00:00.000Z",
"collect": {
"tokenizer_id": "tntabc123xyz",
"environment": "sandbox",
"host": "collect-sandbox.payra.com"
}
}{
"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>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Retrieve a payment method session
With a secret key, the current state of one of your sessions. With a publishable key and the session client_secret, the same object plus collect, which is what Payra Elements uses to mount the secure fields. This is the only endpoint a browser calls directly.
curl --request GET \
--url https://api-dashboard.payra.com/v1/payment-method-sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payment-method-sessions/{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-method-sessions/{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-method-sessions/{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-method-sessions/{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-method-sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payment-method-sessions/{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_session",
"id": "pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"status": "requires_payment_method",
"customer": null,
"payment_method_types": [
"card"
],
"amount": null,
"currency": null,
"livemode": false,
"expires_at": "2026-09-17T18:30:00.000Z",
"canceled_at": null,
"succeeded_at": null,
"card": null,
"us_bank_account": null,
"ach_authorization": null,
"payment_method": null,
"created_at": "2026-09-17T18:00:00.000Z",
"collect": {
"tokenizer_id": "tntabc123xyz",
"environment": "sandbox",
"host": "collect-sandbox.payra.com"
}
}{
"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>"
}
}{
"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 - 64Query Parameters
Required with a publishable key: the secret returned when the session was created.
Response
The session; with a publishable key, also where to collect
payment_method_session "pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd"
requires_payment_method, succeeded, canceled, expired "requires_payment_method"
null
card, us_bank_account ["card"]
What a one-time bank debit will authorize, in the smallest unit of currency. Null on a card session and when a bank account is being saved.
null
USD null
false
"2026-09-17T18:30:00.000Z"
null
null
Set once the browser confirmed a card.
Show child attributes
Show child attributes
null
Set once the browser confirmed a bank account.
Show child attributes
Show child attributes
null
On a us_bank_account session: the authorization shown to the account holder, and when they accepted it.
Show child attributes
Show child attributes
null
The payment method your server created from this session, once it did.
null
"2026-09-17T18:00:00.000Z"
Present only when retrieved with a publishable key and the session client_secret.
Show child attributes
Show child attributes