Skip to content

Subscriptions

List subscriptions

subscriptions:read
ParameterInTypeRequiredDescription
statusquerystringNoactive | paused | cancelled
customerIdquerystringNoFilter by customer
nextInvoiceBeforequerystringNoYYYY-MM-DD — next occurrence on/before this date
externalReferencequerystringNoExact match on your own reference
limitqueryintegerNoPage size, 1-200 (default 50)
cursorquerystringNoOpaque cursor from meta.nextCursor
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 6
FieldTypeDescription
data[].iduuidStable subscription id.
data[].intervalobjectBilling cadence unit and count.
data[].nextInvoiceDatedateNext period the engine will invoice.
data[].statusactive | paused | cancelledCurrent subscription state.
data[].periodsBehindintegerUnprocessed periods. Zero means on schedule.
meta.nextCursor`stringnull`
Possible errors 5
HTTPCodeMeaning
400invalid_cursorThe cursor is malformed, expired or belongs to another list shape.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
429rate_limitedThe organisation’s rate budget is exhausted.

Create subscription

subscriptions:write
Request body fields 21
FieldTypeRequiredDescription
customerIdstringYesThe customer this resource belongs to.
namestringYesHuman-readable name.
intervalobjectYesField in the request payload.
interval.unitstringYesField in the request payload.
interval.countintegerYesField in the request payload.
startDatestringYesField in the request payload.
endDatestringNoField in the request payload.
periodCountintegerNoField in the request payload.
trialEndstringNoField in the request payload.
trialEndBehaviorstringNoField in the request payload.
dueDaysintegerNoField in the request payload.
autoSendbooleanNoField in the request payload.
pauseFeeOereintegerNoField in the request payload.
linesobject[]YesInvoice or subscription line items.
lines[].descriptionstringYesHuman-readable description.
lines[].quantitynumberYesPositive quantity for this line.
lines[].unitPriceOereintegerYesUnit price in integer øre.
lines[].vatRateBpsintegerNoVAT rate in basis points. 2500 means 25%.
lines[].vatExemptionReasonstringNoRequired legal reason when the VAT rate is zero.
externalReferencestringNoYour stable reference for reconciliation and idempotent imports.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"customerId": "9b2f1c1e-…",
"name": "Acme ApS",
"interval": {
"unit": "week",
"count": 1
},
"startDate": "2026-08-15",
"lines": [
{
"description": "Consulting",
"quantity": 1,
"unitPriceOere": 125000,
"vatRateBps": 2500
}
],
"endDate": "2026-08-15"
}'
201 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 9
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"customerId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"interval": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"week",
"month",
"year"
]
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"unit",
"count"
],
"additionalProperties": false
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"endDate": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "null"
}
]
},
"periodCount": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 600
},
{
"type": "null"
}
]
},
"trialEnd": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "null"
}
]
},
"trialEndBehavior": {
"anyOf": [
{
"type": "string",
"enum": [
"cancel",
"create_invoice",
"pause"
]
},
{
"type": "null"
}
]
},
"dueDays": {
"default": 30,
"type": "integer",
"minimum": 0,
"maximum": 365
},
"autoSend": {
"default": true,
"type": "boolean"
},
"pauseFeeOere": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 1000000000
},
"lines": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100000
},
"unitPriceOere": {
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"vatRateBps": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vatExemptionReason": {
"anyOf": [
{
"type": "string",
"enum": [
"ML13",
"OMVENDT",
"EU_VARE",
"EKSPORT"
]
},
{
"type": "null"
}
]
}
},
"required": [
"description",
"quantity",
"unitPriceOere"
],
"additionalProperties": false
}
},
"externalReference": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
{
"type": "null"
}
]
}
},
"required": [
"customerId",
"name",
"interval",
"startDate",
"lines"
],
"additionalProperties": false
}

Get subscription

subscriptions:read
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Update recipe

subscriptions:write

Partial; affects FUTURE occurrences only. status/nextInvoiceDate are never writable.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request body fields 21
FieldTypeRequiredDescription
customerIdstringNoThe customer this resource belongs to.
namestringNoHuman-readable name.
intervalobjectNoField in the request payload.
interval.unitstringYesField in the request payload.
interval.countintegerYesField in the request payload.
startDatestringNoField in the request payload.
endDatestringNoField in the request payload.
periodCountintegerNoField in the request payload.
trialEndstringNoField in the request payload.
trialEndBehaviorstringNoField in the request payload.
dueDaysintegerNoField in the request payload.
autoSendbooleanNoField in the request payload.
pauseFeeOereintegerNoField in the request payload.
linesobject[]NoInvoice or subscription line items.
lines[].descriptionstringYesHuman-readable description.
lines[].quantitynumberYesPositive quantity for this line.
lines[].unitPriceOereintegerYesUnit price in integer øre.
lines[].vatRateBpsintegerNoVAT rate in basis points. 2500 means 25%.
lines[].vatExemptionReasonstringNoRequired legal reason when the VAT rate is zero.
externalReferencestringNoYour stable reference for reconciliation and idempotent imports.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X PATCH https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"customerId": "9b2f1c1e-…",
"name": "Acme ApS",
"interval": {
"unit": "week",
"count": 1
},
"startDate": "2026-08-15"
}'
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"customerId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"interval": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"week",
"month",
"year"
]
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
},
"required": [
"unit",
"count"
],
"additionalProperties": false
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"endDate": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "null"
}
]
},
"periodCount": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 600
},
{
"type": "null"
}
]
},
"trialEnd": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "null"
}
]
},
"trialEndBehavior": {
"anyOf": [
{
"type": "string",
"enum": [
"cancel",
"create_invoice",
"pause"
]
},
{
"type": "null"
}
]
},
"dueDays": {
"type": "integer",
"minimum": 0,
"maximum": 365
},
"autoSend": {
"type": "boolean"
},
"pauseFeeOere": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000
},
"lines": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100000
},
"unitPriceOere": {
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"vatRateBps": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vatExemptionReason": {
"anyOf": [
{
"type": "string",
"enum": [
"ML13",
"OMVENDT",
"EU_VARE",
"EKSPORT"
]
},
{
"type": "null"
}
]
}
},
"required": [
"description",
"quantity",
"unitPriceOere"
],
"additionalProperties": false
}
},
"externalReference": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}

POST /v1/subscriptions/{subscriptionId}/pause

Section titled “POST /v1/subscriptions/{subscriptionId}/pause”

Pause (from active)

subscriptions:write
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/pause \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 8
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/subscriptions/{subscriptionId}/resume

Section titled “POST /v1/subscriptions/{subscriptionId}/resume”

Resume (from paused) — optional billingCycleAnchor: “unchanged” (default, keeps the cycle) or “now” (resets the cycle and invoices today, no proration)

subscriptions:write
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request body fields 1
FieldTypeRequiredDescription
billingCycleAnchorstringNoField in the request payload.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/resume \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"billingCycleAnchor": "now"
}'
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"billingCycleAnchor": {
"type": "string",
"enum": [
"now",
"unchanged"
]
}
},
"additionalProperties": false
}

POST /v1/subscriptions/{subscriptionId}/cancel

Section titled “POST /v1/subscriptions/{subscriptionId}/cancel”

Cancel (final)

subscriptions:write
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/cancel \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 8
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
429rate_limitedThe organisation’s rate budget is exhausted.

GET /v1/subscriptions/{subscriptionId}/invoices

Section titled “GET /v1/subscriptions/{subscriptionId}/invoices”

Generated invoices

subscriptions:read
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/invoices \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

GET /v1/subscriptions/{subscriptionId}/next_invoice

Section titled “GET /v1/subscriptions/{subscriptionId}/next_invoice”

Preview next occurrence

subscriptions:read
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/next_invoice \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Date, lines, VAT and total — nothing is issued. data is null when nothing is coming.application/json
Response fields 4
FieldTypeDescription
data.periodDatedatePeriod the preview covers.
data.dueDatedateCalculated due date.
data.linesobject[]Calculated lines; nothing has been issued yet.
data.totalOereintegerPreview total including VAT.
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/subscriptions/{subscriptionId}/run

Section titled “POST /v1/subscriptions/{subscriptionId}/run”

Run next due period now

subscriptions:write

Respects the engine’s lease and run receipt — one invoice per period; a future period cannot run early.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/run \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Possible errors 8
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/subscriptions/{subscriptionId}/usage

Section titled “POST /v1/subscriptions/{subscriptionId}/usage”

Report usage

subscriptions:write

The next occurrence invoices the period’s usage ON TOP of the template lines, aggregated per (unit, unit price). Send an idempotencyKey: a repeat returns the FIRST row id with duplicate:true and status 200 — not a 409, because after a timeout you cannot tell ‘already sent’ from ‘failed’. period is your own bookkeeping and does NOT decide when it is invoiced.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request body fields 6
FieldTypeRequiredDescription
unitstringYesField in the request payload.
quantitynumberYesPositive quantity for this line.
unitPriceOereintegerYesUnit price in integer øre.
idempotencyKeystringNoField in the request payload.
periodstringNoField in the request payload.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/usage \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"unit": "…",
"quantity": 1,
"unitPriceOere": 125000
}'
201 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 20
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"unitPriceOere": {
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"idempotencyKey": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 128
},
{
"type": "null"
}
]
},
"period": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
{
"type": "null"
}
]
}
},
"required": [
"unit",
"quantity",
"unitPriceOere"
],
"additionalProperties": false
}

GET /v1/subscriptions/{subscriptionId}/meters

Section titled “GET /v1/subscriptions/{subscriptionId}/meters”

Real-time usage balance

subscriptions:read

What the customer has used RIGHT NOW, per meter — without waiting for an invoice. The number comes from exactly the query the invoicing uses, so the balance and the bill can never disagree. The list is what is UNBILLED: a subscription that has just run returns an empty list, not the period’s history.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/meters \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/subscriptions/{subscriptionId}/meters/{meterId}/events

Section titled “POST /v1/subscriptions/{subscriptionId}/meters/{meterId}/events”

Report a raw meter event

subscriptions:write

Send ONE raw event; we aggregate (sum/count/last) and price it — including tiered and package prices. This is the difference from /usage, which takes a FINISHED number you summed and priced yourself: if that number is wrong, we cannot see it. occurredAt is the event’s OWN timestamp, not the time we received it — a nightly batch MUST set it, or yesterday’s events land in today’s period and a last meter bills the wrong reading. A repeat of idempotencyKey returns the FIRST row id with duplicate:true and status 200, not a 409.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
meterIdpathstringYes
Request body fields 4
FieldTypeRequiredDescription
valuenumberNoField in the request payload.
occurredAtstringNoField in the request payload.
idempotencyKeystringNoField in the request payload.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/meters/9b2f1c1e-…/events \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"value": 1
}'
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"value": {
"default": 1,
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"occurredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"idempotencyKey": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 128
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}

POST /v1/subscriptions/{subscriptionId}/preview

Section titled “POST /v1/subscriptions/{subscriptionId}/preview”

Preview a change (no side effects)

subscriptions:read

Computes the prorated difference for a proposed set of lines WITHOUT changing anything. ⚠️ Send the returned prorationDate back when you save the change — two different proration dates give two different amounts. proration: null is a valid answer: the creditor uses none, nothing has been invoiced yet, or the change does not trigger proration. A NEGATIVE amount is a CREDIT, never a refund. POST rather than GET because line descriptions are customer data and must not end up in a URL.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request body fields 7
FieldTypeRequiredDescription
linesobject[]YesInvoice or subscription line items.
lines[].descriptionstringYesHuman-readable description.
lines[].quantitynumberYesPositive quantity for this line.
lines[].unitPriceOereintegerYesUnit price in integer øre.
lines[].vatRateBpsintegerNoVAT rate in basis points. 2500 means 25%.
lines[].vatExemptionReasonstringNoRequired legal reason when the VAT rate is zero.
prorationDatestringNoField in the request payload.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/preview \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"lines": [
{
"description": "Consulting",
"quantity": 1,
"unitPriceOere": 125000,
"vatRateBps": 2500
}
],
"prorationDate": "2026-08-15"
}'
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"lines": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100000
},
"unitPriceOere": {
"type": "integer",
"minimum": 0,
"maximum": 100000000
},
"vatRateBps": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vatExemptionReason": {
"anyOf": [
{
"type": "string",
"enum": [
"ML13",
"OMVENDT",
"EU_VARE",
"EKSPORT"
]
},
{
"type": "null"
}
]
}
},
"required": [
"description",
"quantity",
"unitPriceOere"
],
"additionalProperties": false
}
},
"prorationDate": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
}
},
"required": [
"lines"
],
"additionalProperties": false
}

POST /v1/subscriptions/{subscriptionId}/payment_method_session

Section titled “POST /v1/subscriptions/{subscriptionId}/payment_method_session”

Start a card enrolment session

subscriptions:write

Returns a single-use URL you send your own user to. Card fields exist only on our checkout page. Also covers RENEWING an expiring card. The link expires in 2 hours and dies on first use. An optional returnUrl must point at one of your VERIFIED embed origins (422 return_url_not_allowed otherwise).

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request body fields 2
FieldTypeRequiredDescription
returnUrlstringNoField in the request payload.
localestringNoField in the request payload.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/payment_method_session \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{}'
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 10
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"returnUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"format": "uri"
},
{
"type": "null"
}
]
},
"locale": {
"anyOf": [
{
"type": "string",
"enum": [
"da",
"en"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}

GET /v1/subscriptions/{subscriptionId}/payment_method

Section titled “GET /v1/subscriptions/{subscriptionId}/payment_method”

Get the stored payment method

subscriptions:read
ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/payment_method \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Masked card, type, expiry, provider and whether it is bound to THIS subscription. data is null when there is none.application/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

DELETE /v1/subscriptions/{subscriptionId}/payment_method

Section titled “DELETE /v1/subscriptions/{subscriptionId}/payment_method”

Detach the card

subscriptions:write

Only a card bound to THIS subscription is detached. A customer-wide default card is shared with her other agreements and returns 409 payment_method_not_bound.

ParameterInTypeRequiredDescription
subscriptionIdpathstringYes
Request exampleNo request body
curl -X DELETE https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/payment_method \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Response fields 5
FieldTypeDescription
data.iduuidStable subscription id.
data.intervalobjectBilling cadence unit and count.
data.nextInvoiceDatedateNext period the engine will invoice.
data.statusactive | paused | cancelledCurrent subscription state.
data.periodsBehindintegerUnprocessed periods. Zero means on schedule.
Possible errors 8
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404subscription_not_foundThe subscription does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
429rate_limitedThe organisation’s rate budget is exhausted.