curl --request GET \
--url https://app.pennylane.com/api/external/v2/billing_subscriptions \
--header 'Authorization: Bearer <token>'
{
"has_more": true,
"next_cursor": "dXBkYXRlZF9hdDoxNjc0MTIzNDU2",
"items": [
{
"id": 42,
"next_occurrence": "2023-01-01",
"prev_occurrence": "2023-01-01",
"stopped_at": "2023-08-30T10:08:08.146343Z",
"start": "2023-01-01",
"finish": "2023-12-31",
"status": "draft",
"mode": "awaiting_validation",
"activated_at": "2023-08-30T10:08:08.146343Z",
"payment_conditions": "upon_receipt",
"payment_method": "offline",
"email_settings": {
"recipients": [
"jsmith@example.com"
],
"billing_email_template": {
"id": 123,
"label": "<string>"
}
},
"recurring_rule": {
"day_of_month": [
123
],
"week_start": 123,
"day": [
123
],
"rule_type": "monthly",
"interval": 123,
"count": 12,
"until": "<string>"
},
"customer": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/customers/42"
},
"customer_invoice_data": {
"label": "Demo label",
"currency": "EUR",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"currency_tax": "34.0",
"language": "fr_FR",
"customer_invoice_template": {
"id": 123
},
"discount": {
"type": "absolute",
"value": "25"
},
"pdf_invoice_free_text": "Thanks for paying this invoice",
"pdf_invoice_subject": "Invoice subject",
"pdf_description": "Invoice description",
"special_mention": "Additional details",
"invoice_line_sections": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_line_sections"
},
"invoice_lines": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_lines"
}
},
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
]
}
This endpoint returns a list of subscriptions.
ℹ️ This endpoint requires one of the following scopes:
billing_subscriptions:all
,billing_subscriptions:readonly
curl --request GET \
--url https://app.pennylane.com/api/external/v2/billing_subscriptions \
--header 'Authorization: Bearer <token>'
{
"has_more": true,
"next_cursor": "dXBkYXRlZF9hdDoxNjc0MTIzNDU2",
"items": [
{
"id": 42,
"next_occurrence": "2023-01-01",
"prev_occurrence": "2023-01-01",
"stopped_at": "2023-08-30T10:08:08.146343Z",
"start": "2023-01-01",
"finish": "2023-12-31",
"status": "draft",
"mode": "awaiting_validation",
"activated_at": "2023-08-30T10:08:08.146343Z",
"payment_conditions": "upon_receipt",
"payment_method": "offline",
"email_settings": {
"recipients": [
"jsmith@example.com"
],
"billing_email_template": {
"id": 123,
"label": "<string>"
}
},
"recurring_rule": {
"day_of_month": [
123
],
"week_start": 123,
"day": [
123
],
"rule_type": "monthly",
"interval": 123,
"count": 12,
"until": "<string>"
},
"customer": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/customers/42"
},
"customer_invoice_data": {
"label": "Demo label",
"currency": "EUR",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"currency_tax": "34.0",
"language": "fr_FR",
"customer_invoice_template": {
"id": 123
},
"discount": {
"type": "absolute",
"value": "25"
},
"pdf_invoice_free_text": "Thanks for paying this invoice",
"pdf_invoice_subject": "Invoice subject",
"pdf_description": "Invoice description",
"special_mention": "Additional details",
"invoice_line_sections": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_line_sections"
},
"invoice_lines": {
"url": "https://app.pennylane.com/api/external/v2/billing_subscriptions/42/invoice_lines"
}
},
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
]
}
The access token received from the authorization server in the OAuth 2.0 flow.
Cursor for pagination. Use this to fetch the next set of results. The cursor is an opaque string returned in the previous response's metadata. Leave empty for the first request.
"dXBkYXRlZF9hdDoxNjc0MTIzNDU2"
Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 100.
1 <= x <= 100
20
You can choose to filter items on specific fields. Available fields and values:
id
, start
, customer_id
: lt
, lteq
, gt
, gteq
, eq
, not_eq
, in
, not_in
status
: eq
, not_eq
, in
, not_in
"[{\"field\": \"status\", \"operator\": \"eq\", \"value\": \"in_progress\"}]"
You can choose to sort items on specific attributes
Sort field may be prefixed with -
for descending order.
Example : id
will sort by ascending order, -id
will sort by descending order.
Available fields : id
"id"
Returns a list of billing subscriptions
The response is of type object
.
Was this page helpful?