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>"
}
}Retrieve an invoice
One invoice of your workspace, whether it came from your ERP or was created in the Payra dashboard.
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
A secret key, sk_test_... or sk_live_...; a publishable key (pk_...) on the browser routes only
Path Parameters
1 - 64Response
The invoice
invoice "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31"
The invoice number your customer sees.
"INV-1042"
Your ERP's id for the invoice; null for invoices created in the Payra dashboard.
"SO-55512"
The customer the invoice bills, as GET /customers/{id} knows it.
"019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30"
open still owes money, whether sent or scheduled to be sent; paid and canceled are settled. Drafts are not listed.
open, paid, canceled "open"
True from the day after due_date while the invoice is open.
false
ISO 4217: USD or CAD.
"USD"
The invoice total, in the smallest unit.
125000
Collected so far, refunds netted out.
25000
Charges still processing, such as a bank debit not yet settled; owed until they fail.
0
What a payer can still pay today: the total less what was paid, pending or written off. An early-payment discount is applied on the payment page, not here.
100000
"2026-09-30"
"2026-10-30"
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.
"https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f"
true
"2026-09-30T23:00:40.670Z"