Retrieve an invoice
curl --request GET \
--url https://api-dashboard.payra.com/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/invoices/{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/invoices/{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/invoices/{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/invoices/{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/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/invoices/{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": "invoice",
"id": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31",
"number": "INV-1042",
"external_id": "SO-55512",
"customer": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30",
"status": "open",
"past_due": false,
"currency": "USD",
"total": 125000,
"amount_paid": 25000,
"amount_pending": 0,
"amount_due": 100000,
"invoice_date": "2026-09-30",
"due_date": "2026-10-30",
"payment_url": "https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f",
"livemode": true,
"created_at": "2026-09-30T23:00:40.670Z"
}{
"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>"
}
}Invoices
Retrieve an invoice
One invoice of your workspace, whether it came from your ERP or was created in the Payra dashboard.
GET
/
invoices
/
{id}
Retrieve an invoice
curl --request GET \
--url https://api-dashboard.payra.com/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/invoices/{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/invoices/{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/invoices/{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/invoices/{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/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/invoices/{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": "invoice",
"id": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31",
"number": "INV-1042",
"external_id": "SO-55512",
"customer": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30",
"status": "open",
"past_due": false,
"currency": "USD",
"total": 125000,
"amount_paid": 25000,
"amount_pending": 0,
"amount_due": 100000,
"invoice_date": "2026-09-30",
"due_date": "2026-10-30",
"payment_url": "https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f",
"livemode": true,
"created_at": "2026-09-30T23:00:40.670Z"
}{
"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
Response
The invoice
The hosted page where the customer pays this invoice. Null when there is none a payer could use: the invoice is settled, nothing is left to pay while a charge is pending, its link expired or was revoked, or no link was ever made (an invoice created in the dashboard and never sent). The URL stays the same while it works, so it can be printed; it changes when the invoice is sent again from the dashboard, and the earlier one keeps working.
Example:
"https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f"