Skip to content

Service-Period Invoices

Use this guide when an invoice needs revenue categorization and recognition over a service period. For basic creation, start with Invoices.

Before You Start

Use an API key and the issuing entity’s ID. Replace fcat_subscription in the example with an existing financial category belonging to that entity. Omit financial_category_id if you do not need categorization; recognition can report the line as uncategorized.

Categorized Service-Period Invoices

For subscriptions, memberships, hosting, retainers, and other service-period billing, categorize the revenue on the line item and add line-level revenue recognition:

Terminal window
curl -X POST "https://eu.spaceinvoices.com/invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"name": "Nebula Propulsion Labs"
},
"date_service": "2026-07-01",
"date_service_to": "2026-07-31",
"items": [
{
"name": "Monthly platform subscription",
"quantity": 1,
"unit": "month",
"price": 99,
"taxes": [{ "classification": "standard" }],
"financial_category_id": "fcat_subscription",
"revenue_recognition": {
"method": "service_period_daily",
"date_from": "2026-07-01",
"date_to": "2026-07-31"
}
}
]
}'

Use financial_category_id directly on each line when the category is known while creating the invoice. Use category_assignments when assigning categories by request item index, for example when the item payload is generated separately.

Finalize and Check Recognition

Recognition entries count finalized revenue documents. If the response has is_draft: true, finalize the invoice before checking reports. Draft and voided invoices do not contribute.

Use the revenue recognition report for the service-period dates to check the allocation. The example explicitly opts the line into daily service-period recognition; ordinary invoices do not need this configuration.