Parameter In Type Required Description statusquery stringNo active | paused | cancelled customerIdquery stringNo Filter by customer nextInvoiceBeforequery stringNo YYYY-MM-DD — next occurrence on/before this date externalReferencequery stringNo Exact match on your own reference limitquery integerNo Page size, 1-200 (default 50) cursorquery stringNo Opaque cursor from meta.nextCursor
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 6
Field Type Description 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`string null`
Possible errors 5
HTTP Code Meaning 400 invalid_cursorThe cursor is malformed, expired or belongs to another list shape. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body fields 21
Field Type Required Description customerIdstringYes The customer this resource belongs to. namestringYes Human-readable name. intervalobjectYes Field in the request payload. interval.unitstringYes Field in the request payload. interval.countintegerYes Field in the request payload. startDatestringYes Field in the request payload. endDatestringNo Field in the request payload. periodCountintegerNo Field in the request payload. trialEndstringNo Field in the request payload. trialEndBehaviorstringNo Field in the request payload. dueDaysintegerNo Field in the request payload. autoSendbooleanNo Field in the request payload. pauseFeeOereintegerNo Field in the request payload. linesobject[]Yes Invoice or subscription line items. lines[].descriptionstringYes Human-readable description. lines[].quantitynumberYes Positive quantity for this line. lines[].unitPriceOereintegerYes Unit price in integer øre. lines[].vatRateBpsintegerNo VAT rate in basis points. 2500 means 25%. lines[].vatExemptionReasonstringNo Required legal reason when the VAT rate is zero. externalReferencestringNo Your stable reference for reconciliation and idempotent imports. metadataobjectNo Your own string key/value data. Never used for Rieck business logic.
Request example application/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 " \
"customerId": "9b2f1c1e-…",
"startDate": "2026-08-15",
"description": "Consulting",
const svar = await rieck . request ( " POST " , " /v1/subscriptions " , {
" customerId " : " 9b2f1c1e-… " ,
" startDate " : " 2026-08-15 " ,
" description " : " Consulting " ,
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
201 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "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)$ "
"additionalProperties" : false
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
"additionalProperties" : false
"additionalProperties" : {
"additionalProperties" : false
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-… \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions/9b2f1c1e-… " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Partial; affects FUTURE occurrences only. status/nextInvoiceDate are never writable.
Parameter In Type Required Description subscriptionIdpath stringYes
Request body fields 21
Field Type Required Description customerIdstringNo The customer this resource belongs to. namestringNo Human-readable name. intervalobjectNo Field in the request payload. interval.unitstringYes Field in the request payload. interval.countintegerYes Field in the request payload. startDatestringNo Field in the request payload. endDatestringNo Field in the request payload. periodCountintegerNo Field in the request payload. trialEndstringNo Field in the request payload. trialEndBehaviorstringNo Field in the request payload. dueDaysintegerNo Field in the request payload. autoSendbooleanNo Field in the request payload. pauseFeeOereintegerNo Field in the request payload. linesobject[]No Invoice or subscription line items. lines[].descriptionstringYes Human-readable description. lines[].quantitynumberYes Positive quantity for this line. lines[].unitPriceOereintegerYes Unit price in integer øre. lines[].vatRateBpsintegerNo VAT rate in basis points. 2500 means 25%. lines[].vatExemptionReasonstringNo Required legal reason when the VAT rate is zero. externalReferencestringNo Your stable reference for reconciliation and idempotent imports. metadataobjectNo Your own string key/value data. Never used for Rieck business logic.
Request example application/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 " \
"customerId": "9b2f1c1e-…",
"startDate": "2026-08-15"
const svar = await rieck . request ( " PATCH " , " /v1/subscriptions/9b2f1c1e-… " , {
" customerId " : " 9b2f1c1e-… " ,
" startDate " : " 2026-08-15 "
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "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)$ "
"additionalProperties" : false
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
"additionalProperties" : false
"additionalProperties" : {
"additionalProperties" : false
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/pause \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 "
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/pause " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 429 rate_limitedThe organisation’s rate budget is exhausted.
Parameter In Type Required Description subscriptionIdpath stringYes
Request body fields 1
Field Type Required Description billingCycleAnchorstringNo Field in the request payload.
Request example application/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 " \
"billingCycleAnchor": "now"
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/resume " , {
" billingCycleAnchor " : " now "
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "additionalProperties" : false
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/cancel \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 "
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/cancel " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 429 rate_limitedThe organisation’s rate budget is exhausted.
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/invoices \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions/9b2f1c1e-…/invoices " );
"periodDate" : " 2026-08-01 " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"issuedDate" : " 2026-08-01 " ,
200 Success envelope application/json
Possible errors 5
HTTP Code Meaning 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/next_invoice \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions/9b2f1c1e-…/next_invoice " );
"periodDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
200 Date, lines, VAT and total — nothing is issued. data is null when nothing is coming. application/json
Response fields 4
Field Type Description 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
HTTP Code Meaning 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Respects the engine’s lease and run receipt — one invoice per period; a future period cannot run early.
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl -X POST https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/run \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 "
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/run " );
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
200 Success envelope application/json
Possible errors 8
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 429 rate_limitedThe organisation’s rate budget is exhausted.
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.
Parameter In Type Required Description subscriptionIdpath stringYes
Request body fields 6
Field Type Required Description unitstringYes Field in the request payload. quantitynumberYes Positive quantity for this line. unitPriceOereintegerYes Unit price in integer øre. idempotencyKeystringNo Field in the request payload. periodstringNo Field in the request payload. metadataobjectNo Your own string key/value data. Never used for Rieck business logic.
Request example application/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 " \
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/usage " , {
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
201 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "pattern" : " ^ \\ d{4}- \\ d{2}- \\ d{2}$ "
"additionalProperties" : {
"additionalProperties" : false
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.
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/meters \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions/9b2f1c1e-…/meters " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
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.
Parameter In Type Required Description subscriptionIdpath stringYes meterIdpath stringYes
Request body fields 4
Field Type Required Description valuenumberNo Field in the request payload. occurredAtstringNo Field in the request payload. idempotencyKeystringNo Field in the request payload. metadataobjectNo Your own string key/value data. Never used for Rieck business logic.
Request example application/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 " \
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/meters/9b2f1c1e-…/events " , {
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "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))$ "
"additionalProperties" : {
"additionalProperties" : false
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.
Parameter In Type Required Description subscriptionIdpath stringYes
Request body fields 7
Field Type Required Description linesobject[]Yes Invoice or subscription line items. lines[].descriptionstringYes Human-readable description. lines[].quantitynumberYes Positive quantity for this line. lines[].unitPriceOereintegerYes Unit price in integer øre. lines[].vatRateBpsintegerNo VAT rate in basis points. 2500 means 25%. lines[].vatExemptionReasonstringNo Required legal reason when the VAT rate is zero. prorationDatestringNo Field in the request payload.
Request example application/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 " \
"description": "Consulting",
"prorationDate": "2026-08-15"
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/preview " , {
" description " : " Consulting " ,
" prorationDate " : " 2026-08-15 "
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
"additionalProperties" : false
"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))$ "
"additionalProperties" : false
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).
Parameter In Type Required Description subscriptionIdpath stringYes
Request body fields 2
Field Type Required Description returnUrlstringNo Field in the request payload. localestringNo Field in the request payload.
Request example application/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 " \
const svar = await rieck . request ( " POST " , " /v1/subscriptions/9b2f1c1e-…/payment_method_session " , {
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 400 invalid_requestThe request body or parameter failed validation. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 413 payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit. 429 rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema "additionalProperties" : false
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/subscriptions/9b2f1c1e-…/payment_method \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/subscriptions/9b2f1c1e-…/payment_method " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
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
Field Type Description 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
HTTP Code Meaning 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
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.
Parameter In Type Required Description subscriptionIdpath stringYes
Request example No 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 "
const svar = await rieck . request ( " DELETE " , " /v1/subscriptions/9b2f1c1e-…/payment_method " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"customerName" : " Acme ApS " ,
"name" : " Monthly service " ,
"startDate" : " 2026-08-01 " ,
"nextInvoiceDate" : " 2026-09-01 " ,
"description" : " Monthly service " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"periodDate" : " 2026-08-01 "
"externalReference" : " subscription-88 " ,
"createdAt" : " 2026-08-01T08:00:00Z "
200 Success envelope application/json
Response fields 5
Field Type Description 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
HTTP Code Meaning 400 invalid_idempotency_keyIdempotency-Key is missing or malformed. 401 invalid_api_keyThe API key is missing, invalid, expired or revoked. 403 api_not_includedThe organisation’s plan does not include API access. 403 insufficient_scopeThe key does not have the required scope. 404 subscription_not_foundThe subscription does not exist or belongs to another organisation. 409 idempotency_conflictThe same key was used with a different request. 409 idempotency_in_progressThe same operation is currently being processed. Retry later. 429 rate_limitedThe organisation’s rate budget is exhausted.