curl --request GET \
--url https://api-dashboard.payra.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payments/{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/payments/{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/payments/{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/payments/{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/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payments/{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",
"id": "pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf",
"status": "succeeded",
"amount": 12550,
"currency": "USD",
"payment_method": "pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf",
"customer": null,
"description": "Invoice INV-1042",
"reference": "INV-1042",
"card": {
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2030,
"wallet": null
},
"failure": {
"code": "invalid_payment_method",
"message": "The card has expired.",
"reason": "expired_card"
},
"next_action": null,
"livemode": false,
"created_at": "2026-09-18T20:00:00.000Z",
"succeeded_at": "2026-09-18T20:00:01.312Z",
"amount_refunded": 0,
"payment_method_type": "card",
"terminal": null,
"terminal_progress": null,
"line_items": null,
"amount_details": null,
"us_bank_account": null,
"acss_debit": null,
"cancellation_reason": null,
"processing_fee": {
"amount": 271,
"currency": "USD",
"basis": "estimate"
}
}{
"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
The current state of one of your payments; a pending one moves as the processor settles it. On a terminal payment still processing, this read also asks the terminal where the customer is and answers it as terminal_progress.
curl --request GET \
--url https://api-dashboard.payra.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/payments/{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/payments/{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/payments/{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/payments/{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/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/payments/{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",
"id": "pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf",
"status": "succeeded",
"amount": 12550,
"currency": "USD",
"payment_method": "pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf",
"customer": null,
"description": "Invoice INV-1042",
"reference": "INV-1042",
"card": {
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2030,
"wallet": null
},
"failure": {
"code": "invalid_payment_method",
"message": "The card has expired.",
"reason": "expired_card"
},
"next_action": null,
"livemode": false,
"created_at": "2026-09-18T20:00:00.000Z",
"succeeded_at": "2026-09-18T20:00:01.312Z",
"amount_refunded": 0,
"payment_method_type": "card",
"terminal": null,
"terminal_progress": null,
"line_items": null,
"amount_details": null,
"us_bank_account": null,
"acss_debit": null,
"cancellation_reason": null,
"processing_fee": {
"amount": 271,
"currency": "USD",
"basis": "estimate"
}
}{
"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
payment "pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf"
processing until the processor answers, and, on a bank debit, until it settles, that is until the processor sends it to the bank in its next batch; authorized when it approved but has not captured; succeeded once a card is captured or a bank debit has settled, which does not make a bank debit final (see returned); failed when it refused (the create then answers 402 and this object stays readable); canceled after a void, a cancel, or a terminal payment nobody paid within five minutes (see cancellation_reason); returned when the money came back after success (a bank return or a chargeback, see failure); requires_action while the customer has to pass 3-D Secure, as next_action says; it then moves to succeeded or failed.
processing, requires_action, authorized, succeeded, failed, canceled, returned "succeeded"
In the smallest unit of the currency (cents).
12550
USD, CAD "USD"
The payment method charged; null on a terminal payment, where the customer presented the card on the terminal.
"pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf"
null
"Invoice INV-1042"
Your reference, as you sent it.
"INV-1042"
Set when payment_method_type is card.
Show child attributes
Show child attributes
Set when status is failed or returned: why, in a fixed vocabulary. card_declined, insufficient_funds, authentication_failed, invalid_payment_method and duplicate_transaction are the processor refusing the card; ach_returned, acss_returned and chargeback are money coming back after success; processing_error is a fault on the way to the processor or in the request, safe to retry later; a refusal in words Payra cannot classify reads card_declined. message is Payra's own sentence for the reason, or for the code when there is none; the processor's own text is never relayed.
Show child attributes
Show child attributes
Set while status is requires_action, for 3-D Secure. redirect, on a charge created with return_url: send the customer to url, a Payra page or the bank's; they come back to your return_url. three_ds_fingerprint and three_ds_challenge, on a charge without it: url is a Payra page your page runs in a frame, hidden for the fingerprint and in a modal for the challenge; Payra Elements does that in handleNextAction, and the payment then turns succeeded or failed without leaving the page. Null otherwise.
Show child attributes
Show child attributes
null
false
"2026-09-18T20:00:00.000Z"
When the card was captured, or the bank debit settled.
"2026-09-18T20:00:01.312Z"
How much of amount has been refunded so far, counting refunds that succeeded, wherever they were made. status stays succeeded; GET /v1/refunds?payment= lists them.
0
us_bank_account for a US bank debit (ACH), acss_debit for a Canadian one (EFT), card_present for a terminal payment. More values may be added: treat one you do not know as a card.
card, us_bank_account, acss_debit, card_present "card"
The terminal a terminal payment was sent to (GET /v1/terminals/{id}); null on any other payment.
null
Where a terminal payment still processing is on its terminal, read from the terminal when you retrieve the payment (GET /v1/payments/{id}). Null on every other answer (the create, lists, events), on a payment that is not open on a terminal, and whenever the terminal did not say: keep showing the last one you read.
Show child attributes
Show child attributes
null
The order behind amount, as you sent it (or as the checkout session it was paid on had it); null when there was none.
Show child attributes
Show child attributes
null
Shipping, tax and discount around line_items; null when none were sent.
Show child attributes
Show child attributes
null
Set when payment_method_type is us_bank_account.
Show child attributes
Show child attributes
null
Set when payment_method_type is acss_debit.
Show child attributes
Show child attributes
null
Set when status is canceled: requested (canceled on request before the card was presented, through the API or in RevOS), expired (no card was presented within five minutes) or voided (voided before the batch, in RevOS or by a full refund). More values may be added.
requested, expired, voided null
What the card charge costs the merchant to process: interchange, scheme fees and processor markup. amount is in the smallest unit of currency, the payment's currency; basis says whether it is Payra's estimate from the card's first six digits or the processor's actual fee. Sandbox preview for now: set on a sandbox card payment in USD of a workspace with the preview enabled, and null otherwise, on a failed or canceled payment, a bank debit, a terminal payment and every live payment. See Processing fee in the API guide for the value each test card gives.
Show child attributes
Show child attributes
{
"amount": 271,
"currency": "USD",
"basis": "estimate"
}