Retrieve
curl --request GET \
--url https://{defaultHost}/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/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{
"id": "df7a1ee7-4f30-4538-b032-f2f8159eb43e",
"object": "invoice",
"automatic_collection": false,
"due_date": null,
"footer": null,
"issue_date": null,
"live_mode": true,
"memo": null,
"metadata": {},
"notifications_enabled": true,
"order_number": null,
"status": "draft",
"portal_url": "http://app.example.com/portal_redirect/invoices/df7a1ee7-4f30-4538-b032-f2f8159eb43e",
"notification_sent_at": null,
"reminder_notification_sent_at": null,
"checkout": "06f6d400-91dd-4d8e-b331-cbe0ccf35b14",
"created_at": 1796063938,
"updated_at": 1796063938
}Invoices
Retrieve
Retrieves details of a specific invoice.
GET
/
v1
/
invoices
/
{id}
Retrieve
curl --request GET \
--url https://{defaultHost}/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/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://{defaultHost}/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/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{
"id": "df7a1ee7-4f30-4538-b032-f2f8159eb43e",
"object": "invoice",
"automatic_collection": false,
"due_date": null,
"footer": null,
"issue_date": null,
"live_mode": true,
"memo": null,
"metadata": {},
"notifications_enabled": true,
"order_number": null,
"status": "draft",
"portal_url": "http://app.example.com/portal_redirect/invoices/df7a1ee7-4f30-4538-b032-f2f8159eb43e",
"notification_sent_at": null,
"reminder_notification_sent_at": null,
"checkout": "06f6d400-91dd-4d8e-b331-cbe0ccf35b14",
"created_at": 1796063938,
"updated_at": 1796063938
}Authorizations
Query Parameters
If true, the server will check the associated payment processor to see if a status change has occured. (This should be used when retrieving a checkout or payment intent immediately after it has been paid through the processor. In this scenario, it's possible that you'll request the checkout before the server has received the webhook from the processor. Setting this pararmeter to true prevents this scenario.)
Response
200 - application/json
Success
Was this page helpful?