Orders
List Orders
List orders.
Scopes: orders:read
GET
/
v1
/
orders
/
Python
from polar.v2027_01 import Polar
polar = Polar("polar_oat_xxx")
for item in polar.orders.iter_list(
page=1,
limit=10,
sorting=['-created_at'],
):
print(item)
import { createPolar } from "@polar-sh/sdk/2027-01";
const polar = createPolar({
accessToken: "polar_oat_xxx",
});
for await (const item of polar.orders.iterList(
{
"page": 1,
"limit": 10,
"sorting": [
"-created_at"
]
},
)) {
console.log(item);
}
curl --request GET \
--url https://api.polar.sh/v1/orders/ \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polar.sh/v1/orders/', 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.polar.sh/v1/orders/",
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.polar.sh/v1/orders/"
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.polar.sh/v1/orders/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polar.sh/v1/orders/")
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{
"items": [
{
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"status": "paid",
"paid": true,
"subtotal_amount": 10000,
"discount_amount": 1000,
"net_amount": 9000,
"tax_amount": 720,
"total_amount": 9720,
"applied_balance_amount": 0,
"due_amount": 0,
"refunded_amount": 0,
"refunded_tax_amount": 0,
"currency": "usd",
"billing_reason": "purchase",
"billing_name": "<string>",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"invoice_number": "<string>",
"is_invoice_generated": true,
"receipt_number": "<string>",
"units": 123,
"customer_id": "<string>",
"product_id": "<string>",
"discount_id": "<string>",
"subscription_id": "<string>",
"checkout_id": "<string>",
"metadata": {},
"platform_fee_amount": 500,
"platform_fee_currency": "usd",
"customer": {
"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"metadata": {},
"email_verified": true,
"type": "individual",
"name": "John Doe",
"billing_name": "John Doe",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"tax_id": {
"[0]": "<string>"
},
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
"deleted_at": "2026-01-01T00:00:00.000000Z",
"first_user_event_at": "2026-01-01T00:00:00.000000Z",
"avatar_url": "https://www.gravatar.com/avatar/xxx?d=404",
"external_id": "usr_1337",
"email": "[email protected]",
"locale": "<string>",
"default_payment_method_id": "<string>"
},
"product": {
"metadata": {},
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"trial_interval": "day",
"trial_interval_count": 123,
"name": "<string>",
"description": "<string>",
"visibility": "draft",
"recurring_interval": "day",
"recurring_interval_count": 123,
"meter_interval": "day",
"meter_interval_count": 123,
"is_recurring": true,
"is_archived": true,
"organization_id": "<string>",
"catalog_id": "<string>",
"is_current": true
},
"discount": {
"duration": "once",
"type": "fixed",
"amounts": {
"eur": 900,
"usd": 1000
},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"external_id": "ext_1337",
"metadata": {},
"name": "<string>",
"code": "<string>",
"starts_at": "2026-01-01T00:00:00.000000Z",
"ends_at": "2026-01-01T00:00:00.000000Z",
"max_redemptions": 123,
"max_redemptions_per_customer": 123,
"redemptions_count": 123,
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
},
"subscription": {
"metadata": {},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"amount": 10000,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 123,
"status": "active",
"current_period_start": "2026-01-01T00:00:00.000000Z",
"current_period_end": "2026-01-01T00:00:00.000000Z",
"current_meter_period_start": "2026-01-01T00:00:00.000000Z",
"current_meter_period_end": "2026-01-01T00:00:00.000000Z",
"trial_start": "2026-01-01T00:00:00.000000Z",
"trial_end": "2026-01-01T00:00:00.000000Z",
"cancel_at_period_end": true,
"canceled_at": "2026-01-01T00:00:00.000000Z",
"started_at": "2026-01-01T00:00:00.000000Z",
"ends_at": "2026-01-01T00:00:00.000000Z",
"ended_at": "2026-01-01T00:00:00.000000Z",
"pause_at_period_end": true,
"paused_at": "2026-01-01T00:00:00.000000Z",
"resumes_at": "2026-01-01T00:00:00.000000Z",
"customer_id": "<string>",
"product_id": "<string>",
"discount_id": "<string>",
"checkout_id": "<string>",
"units": 123,
"customer_cancellation_reason": "customer_service",
"customer_cancellation_comment": "<string>",
"past_due_at": "2026-01-01T00:00:00.000000Z",
"seats": 123
},
"items": [
{
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"label": "Pro Plan",
"amount": 10000,
"tax_amount": 720,
"proration": false,
"product_price_id": "<string>",
"start_timestamp": "2026-01-01T00:00:00.000000Z",
"end_timestamp": "2026-01-01T00:00:00.000000Z"
}
],
"description": "Pro Plan",
"refundable_amount": 9000,
"refundable_tax_amount": 720,
"seats": 123,
"next_payment_attempt_at": "2026-01-01T00:00:00.000000Z",
"custom_field_data": {}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
patoat
You can generate a Personal Access Token from your settings.
Query Parameters
Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.
Available options:
created_at, -created_at, status, -status, invoice_number, -invoice_number, amount, -amount, net_amount, -net_amount, customer, -customer, product, -product, discount, -discount, subscription, -subscription Was this page helpful?
⌘I
Python
from polar.v2027_01 import Polar
polar = Polar("polar_oat_xxx")
for item in polar.orders.iter_list(
page=1,
limit=10,
sorting=['-created_at'],
):
print(item)
import { createPolar } from "@polar-sh/sdk/2027-01";
const polar = createPolar({
accessToken: "polar_oat_xxx",
});
for await (const item of polar.orders.iterList(
{
"page": 1,
"limit": 10,
"sorting": [
"-created_at"
]
},
)) {
console.log(item);
}
curl --request GET \
--url https://api.polar.sh/v1/orders/ \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polar.sh/v1/orders/', 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.polar.sh/v1/orders/",
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.polar.sh/v1/orders/"
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.polar.sh/v1/orders/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polar.sh/v1/orders/")
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{
"items": [
{
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"status": "paid",
"paid": true,
"subtotal_amount": 10000,
"discount_amount": 1000,
"net_amount": 9000,
"tax_amount": 720,
"total_amount": 9720,
"applied_balance_amount": 0,
"due_amount": 0,
"refunded_amount": 0,
"refunded_tax_amount": 0,
"currency": "usd",
"billing_reason": "purchase",
"billing_name": "<string>",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"invoice_number": "<string>",
"is_invoice_generated": true,
"receipt_number": "<string>",
"units": 123,
"customer_id": "<string>",
"product_id": "<string>",
"discount_id": "<string>",
"subscription_id": "<string>",
"checkout_id": "<string>",
"metadata": {},
"platform_fee_amount": 500,
"platform_fee_currency": "usd",
"customer": {
"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"metadata": {},
"email_verified": true,
"type": "individual",
"name": "John Doe",
"billing_name": "John Doe",
"billing_address": {
"country": "US",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>"
},
"tax_id": {
"[0]": "<string>"
},
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
"deleted_at": "2026-01-01T00:00:00.000000Z",
"first_user_event_at": "2026-01-01T00:00:00.000000Z",
"avatar_url": "https://www.gravatar.com/avatar/xxx?d=404",
"external_id": "usr_1337",
"email": "[email protected]",
"locale": "<string>",
"default_payment_method_id": "<string>"
},
"product": {
"metadata": {},
"id": "<string>",
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"trial_interval": "day",
"trial_interval_count": 123,
"name": "<string>",
"description": "<string>",
"visibility": "draft",
"recurring_interval": "day",
"recurring_interval_count": 123,
"meter_interval": "day",
"meter_interval_count": 123,
"is_recurring": true,
"is_archived": true,
"organization_id": "<string>",
"catalog_id": "<string>",
"is_current": true
},
"discount": {
"duration": "once",
"type": "fixed",
"amounts": {
"eur": 900,
"usd": 1000
},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"external_id": "ext_1337",
"metadata": {},
"name": "<string>",
"code": "<string>",
"starts_at": "2026-01-01T00:00:00.000000Z",
"ends_at": "2026-01-01T00:00:00.000000Z",
"max_redemptions": 123,
"max_redemptions_per_customer": 123,
"redemptions_count": 123,
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
},
"subscription": {
"metadata": {},
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"amount": 10000,
"currency": "usd",
"recurring_interval": "month",
"recurring_interval_count": 123,
"status": "active",
"current_period_start": "2026-01-01T00:00:00.000000Z",
"current_period_end": "2026-01-01T00:00:00.000000Z",
"current_meter_period_start": "2026-01-01T00:00:00.000000Z",
"current_meter_period_end": "2026-01-01T00:00:00.000000Z",
"trial_start": "2026-01-01T00:00:00.000000Z",
"trial_end": "2026-01-01T00:00:00.000000Z",
"cancel_at_period_end": true,
"canceled_at": "2026-01-01T00:00:00.000000Z",
"started_at": "2026-01-01T00:00:00.000000Z",
"ends_at": "2026-01-01T00:00:00.000000Z",
"ended_at": "2026-01-01T00:00:00.000000Z",
"pause_at_period_end": true,
"paused_at": "2026-01-01T00:00:00.000000Z",
"resumes_at": "2026-01-01T00:00:00.000000Z",
"customer_id": "<string>",
"product_id": "<string>",
"discount_id": "<string>",
"checkout_id": "<string>",
"units": 123,
"customer_cancellation_reason": "customer_service",
"customer_cancellation_comment": "<string>",
"past_due_at": "2026-01-01T00:00:00.000000Z",
"seats": 123
},
"items": [
{
"created_at": "2026-01-01T00:00:00.000000Z",
"modified_at": "2026-01-01T00:00:00.000000Z",
"id": "<string>",
"label": "Pro Plan",
"amount": 10000,
"tax_amount": 720,
"proration": false,
"product_price_id": "<string>",
"start_timestamp": "2026-01-01T00:00:00.000000Z",
"end_timestamp": "2026-01-01T00:00:00.000000Z"
}
],
"description": "Pro Plan",
"refundable_amount": 9000,
"refundable_tax_amount": 720,
"seats": 123,
"next_payment_attempt_at": "2026-01-01T00:00:00.000000Z",
"custom_field_data": {}
}
],
"pagination": {
"total_count": 123,
"max_page": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
