curl --request GET \
--url https://api.getlago.com/api/v2/payment_receipts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v2/payment_receipts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v2/payment_receipts', 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.getlago.com/api/v2/payment_receipts",
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.getlago.com/api/v2/payment_receipts"
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.getlago.com/api/v2/payment_receipts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v2/payment_receipts")
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{
"payment_receipts": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"number": "example",
"lago_payment_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"pdf_url": "https://documents.example/invoice.pdf",
"xml_url": "https://documents.example/invoice.pdf",
"pdf_url_expires_at": null,
"xml_url_expires_at": null,
"created_at": "2022-04-29T08:59:51.123456Z",
"updated_at": "2022-04-29T08:59:51.123456Z",
"payment": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "customer_123",
"lago_payable_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"payable_type": "Invoice",
"lago_invoice_ids": [
"1a901a90-1a90-1a90-1a90-1a901a901a90"
],
"amount_cents": 100,
"currency": "USD",
"status": "example",
"payment_status": "pending",
"payment_type": "provider",
"reference": "example",
"payment_provider_code": "stripe_main",
"payment_provider_type": "stripe",
"provider_payment_id": "example",
"provider_customer_id": "cus_example",
"next_action": {},
"created_at": "2022-04-29T08:59:51.123456Z",
"updated_at": "2022-04-29T08:59:51.123456Z"
}
}
],
"meta": {
"next_cursor": null,
"prev_cursor": null,
"total_count": 42,
"total_count_estimated": true
}
}{
"code": "invalid_expand",
"details": [
{
"code": "malformed",
"field": "expands",
"meta": {
"allowed_values": []
}
}
]
}{
"code": "unauthorized",
"details": []
}{
"code": "feature_unavailable",
"details": []
}{
"code": "validation_errors",
"details": [
{
"code": "value_is_mandatory",
"field": "name",
"meta": {}
}
]
}List payment receipts
Returns a cursor-paginated list ordered by creation time, newest first.
curl --request GET \
--url https://api.getlago.com/api/v2/payment_receipts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlago.com/api/v2/payment_receipts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlago.com/api/v2/payment_receipts', 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.getlago.com/api/v2/payment_receipts",
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.getlago.com/api/v2/payment_receipts"
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.getlago.com/api/v2/payment_receipts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlago.com/api/v2/payment_receipts")
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{
"payment_receipts": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"number": "example",
"lago_payment_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"pdf_url": "https://documents.example/invoice.pdf",
"xml_url": "https://documents.example/invoice.pdf",
"pdf_url_expires_at": null,
"xml_url_expires_at": null,
"created_at": "2022-04-29T08:59:51.123456Z",
"updated_at": "2022-04-29T08:59:51.123456Z",
"payment": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "customer_123",
"lago_payable_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"payable_type": "Invoice",
"lago_invoice_ids": [
"1a901a90-1a90-1a90-1a90-1a901a901a90"
],
"amount_cents": 100,
"currency": "USD",
"status": "example",
"payment_status": "pending",
"payment_type": "provider",
"reference": "example",
"payment_provider_code": "stripe_main",
"payment_provider_type": "stripe",
"provider_payment_id": "example",
"provider_customer_id": "cus_example",
"next_action": {},
"created_at": "2022-04-29T08:59:51.123456Z",
"updated_at": "2022-04-29T08:59:51.123456Z"
}
}
],
"meta": {
"next_cursor": null,
"prev_cursor": null,
"total_count": 42,
"total_count_estimated": true
}
}{
"code": "invalid_expand",
"details": [
{
"code": "malformed",
"field": "expands",
"meta": {
"allowed_values": []
}
}
]
}{
"code": "unauthorized",
"details": []
}{
"code": "feature_unavailable",
"details": []
}{
"code": "validation_errors",
"details": [
{
"code": "value_is_mandatory",
"field": "name",
"meta": {}
}
]
}X-Lago-Endpoint-Status: beta header.Authorizations
Query Parameters
Opaque next_cursor from a previous response. Returns the next page. Cannot be combined with before or include_total_count=true. Keep the same filters when paging.
"eyJ2IjoxLCJvIjp7InQiOiJ0YXhlcyIsInMiOiJjcmVhdGVkX2F0OmRlc2MsaWQ6ZGVzYyJ9LCJrIjpbIjIwMjItMDQtMjlUMDg6NTk6NTEuMDAwMDAwWiIsIjFhOTAxYTkwLTFhOTAtMWE5MC0xYTkwLTFhOTAxYTkwMWE5MCJdfQ"
Opaque prev_cursor from a previous response. Returns the previous page in the same list order. Cannot be combined with after or include_total_count=true. Keep the same filters when paging.
"eyJ2IjoxLCJvIjp7InQiOiJ0YXhlcyIsInMiOiJjcmVhdGVkX2F0OmRlc2MsaWQ6ZGVzYyJ9LCJrIjpbIjIwMjItMDQtMjlUMDg6NTk6NTEuMDAwMDAwWiIsIjFhOTAxYTkwLTFhOTAtMWE5MC0xYTkwLTFhOTAxYTkwMWE5MCJdfQ"