query · Module: Billing · Requires billing:read
Arguments
| Argument | Type | Description |
|---|---|---|
status | String | Filter by status. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
Returns
PricePlanList!
| Field | Type |
|---|---|
data | [PricePlan!]! |
has_more | Boolean |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query PricePlans($limit: Int) {
pricePlans(limit: $limit) {
data {
id
object
name
status
livemode
created
updated
currency
base_fee {
amount
currency
interval
}
prices {
meter
model
unit_amount
included
rate
tiers {
up_to
unit_amount
}
}
minimum {
amount
currency
interval
}
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"pricePlans": {
"data": [
{
"id": "plan_1a2B3c",
"object": "price_plan",
"name": "Example",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"currency": "usd",
"base_fee": {
"amount": 1299,
"currency": "usd",
"interval": "example"
},
"prices": [
{
"meter": "example",
"model": "per_unit",
"unit_amount": 1.5,
"included": 2,
"rate": 0.145,
"tiers": [
{
"up_to": 2,
"unit_amount": 1.5
}
]
}
],
"minimum": {
"amount": 1299,
"currency": "usd",
"interval": "example"
}
}
],
"has_more": true
}
}
}