List Invoices
curl --request GET \
--url https://{api}.subotiz.com/api/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'GET',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/invoices"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/invoices",
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>",
"Request-Id: <request-id>"
],
]);
$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}.subotiz.com/api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Request-Id", "<request-id>")
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}.subotiz.com/api/v1/invoices")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"has_more": true,
"list": [
{
"invoice_id": "<string>",
"merchant_id": "<string>",
"trade_id": "<string>",
"subscription_id": "<string>",
"price_id": "<string>",
"customer_id": "<string>",
"order_id": "<string>",
"original_invoice_id": "<string>",
"refund_order_id": "<string>",
"amount": "<string>",
"currency": "<string>",
"biz_status": "<string>",
"invoice_type": "<string>",
"paid_at": "<string>",
"cycle_index": 123,
"created_at": "<string>",
"metadata": {},
"Discounts": {
"current_period": [
{
"discount_id": "<string>",
"discount_amount": "<string>",
"discount_code": "<string>"
}
]
},
"price_version_id": "<string>",
"tax_amount": "<string>",
"quantity": "<string>",
"quantity_unit": "<string>",
"payment_timing": "<string>",
"billing_dimension": "<string>",
"price_type": "<string>",
"quantity_tier_type": "<string>",
"price_tier_type": "<string>",
"usage_amount": "<string>",
"unit_price": "<string>",
"tier_breakdown": [
{
"tier_order": 123,
"quantity_min": "<string>",
"quantity_max": "<string>",
"units_in_tier": "<string>",
"unit_price": "<string>",
"flat_amount": "<string>",
"subtotal": "<string>"
}
],
"usage": "<string>",
"merchant_price_id": "<string>"
}
]
}
}Invoice
List Invoices
List Invoices
GET
/
api
/
v1
/
invoices
List Invoices
curl --request GET \
--url https://{api}.subotiz.com/api/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'GET',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/invoices"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/invoices",
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>",
"Request-Id: <request-id>"
],
]);
$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}.subotiz.com/api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Request-Id", "<request-id>")
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}.subotiz.com/api/v1/invoices")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"has_more": true,
"list": [
{
"invoice_id": "<string>",
"merchant_id": "<string>",
"trade_id": "<string>",
"subscription_id": "<string>",
"price_id": "<string>",
"customer_id": "<string>",
"order_id": "<string>",
"original_invoice_id": "<string>",
"refund_order_id": "<string>",
"amount": "<string>",
"currency": "<string>",
"biz_status": "<string>",
"invoice_type": "<string>",
"paid_at": "<string>",
"cycle_index": 123,
"created_at": "<string>",
"metadata": {},
"Discounts": {
"current_period": [
{
"discount_id": "<string>",
"discount_amount": "<string>",
"discount_code": "<string>"
}
]
},
"price_version_id": "<string>",
"tax_amount": "<string>",
"quantity": "<string>",
"quantity_unit": "<string>",
"payment_timing": "<string>",
"billing_dimension": "<string>",
"price_type": "<string>",
"quantity_tier_type": "<string>",
"price_tier_type": "<string>",
"usage_amount": "<string>",
"unit_price": "<string>",
"tier_breakdown": [
{
"tier_order": 123,
"quantity_min": "<string>",
"quantity_max": "<string>",
"units_in_tier": "<string>",
"unit_price": "<string>",
"flat_amount": "<string>",
"subtotal": "<string>"
}
],
"usage": "<string>",
"merchant_price_id": "<string>"
}
]
}
}Authorizations
Headers
Query Parameters
Cursor for pagination. starting_after is the object ID that defines your position in the list. For example, if you want to get the next page, you can use the last object's ID as the parameter value after getting the object list for the first time. Cannot be used together with ending_before
Cursor for pagination. ending_before is the object ID that defines your position in the list. For example, if you want to get the previous page, you can use the first object's ID as the parameter value after getting the object list for the first time. Cannot be used together with starting_after
Was this page helpful?