What the customer has to their credit — from credit notes on paid invoices, or from OVERPAYMENTS. Append-only ledger; the balance is the sum.
Parameter In Type Required Description customerIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/credit-balance \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/customers/9b2f1c1e-…/credit-balance " );
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"creditNoteNumber" : null ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"createdAt" : " 2026-08-08T12:05:44Z "
200 Never negative. movements[].type is arose | offset | refund_declared. application/json
Response fields 2
Field Type Description data.balanceOereintegerCustomer credit available for refund or offset. data.movementsobject[]Append-only credit ledger, newest first.
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 customer_not_foundThe customer does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Records that YOU state the credit was paid back — a declaration, not a transfer: we never see your bank account, and this endpoint moves no money. Rejected with funds_not_settled_yet while the money is still in our client funds (you cannot have forwarded what you have not received) — offset it against the next invoice instead, which happens automatically on issue. Append-only: it cannot be silently undone.
Parameter In Type Required Description customerIdpath stringYes
Request body fields 2
Field Type Required Description amountOereintegerYes Amount in integer øre. 125000 means DKK 1,250.00. reasonstringNo Field in the request payload.
Request example application/json
curl -X POST https://api.rieckflow.com/v1/customers/9b2f1c1e-…/refunds \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 " \
-H " Content-Type: application/json " \
"reason": "Ordered by mistake"
const svar = await rieck . request ( " POST " , " /v1/customers/9b2f1c1e-…/refunds " , {
" reason " : " Ordered by mistake "
200 Success envelope application/json
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 customer_not_foundThe customer 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 "maximum" : 9007199254740991
"additionalProperties" : false
Parameter In Type Required Description invoiceIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payments \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/invoices/9b2f1c1e-…/payments " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"paymentDate" : " 2026-08-08 " ,
"source" : " bank_transfer " ,
"createdAt" : " 2026-08-08T12:05:44Z "
200 Success envelope application/json
Response fields 6
Field Type Description data.iduuidStable payment id. data.invoiceIduuidInvoice the payment belongs to. data.amountOereintegerPayment amount in øre. data.paymentDatedateBank value date. data.sourcestringHow the payment was registered. data.hasReceiptbooleanWhether a receipt can be downloaded.
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 invoice_not_foundThe invoice does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Your Idempotency-Key IS the bookkeeping key — the same key never registers twice.
Parameter In Type Required Description invoiceIdpath stringYes
Request body fields 2
Field Type Required Description amountOereintegerYes Amount in integer øre. 125000 means DKK 1,250.00. paymentDatestringYes Field in the request payload.
Request example application/json
curl -X POST https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payments \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 " \
-H " Content-Type: application/json " \
"paymentDate": "2026-08-15"
const svar = await rieck . request ( " POST " , " /v1/invoices/9b2f1c1e-…/payments " , {
" paymentDate " : " 2026-08-15 "
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"customerId" : " 467a0d8d-b9b2-4df3-bf7b-17d649442890 " ,
"issuedDate" : " 2026-08-04 " ,
"collectionsCaseId" : null ,
"externalReference" : " order-2041 " ,
"createdAt" : " 2026-08-04T09:32:11Z "
"paymentId" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 "
201 Success envelope application/json
Response fields 8
Field Type Description data.iduuidStable invoice id. data.invoiceNumberinteger | nullSequential number. Null while the invoice is a draft. data.statusdraft | issued | paid | overdue | collectionsStored lifecycle status. data.grossOereintegerInvoice total including VAT. data.paidOereintegerTotal registered payments. data.balanceOereintegerAmount still owed now. data.collectionsCaseIduuid | nullCollection case created from this invoice. data.externalReferencestring | nullYour reconciliation reference.
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 invoice_not_foundThe invoice 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" : false
Parameter In Type Required Description invoiceIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payment-link \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/invoices/9b2f1c1e-…/payment-link " );
"url" : " https://pay.rieckflow.com/p/RIE-7K3M2-Q9F4P " ,
"reference" : " order-2041 " ,
"paymentCode" : " RIE-7K3M2-Q9F4P " ,
200 Success envelope application/json
Response fields 4
Field Type Description data.urlurlHosted payment page for this invoice. data.referencestringReference used for reconciliation. data.paymentCodestringShort code the customer can type on the payment site. data.balanceOereintegerCurrent amount due when the link is requested.
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 invoice_not_foundThe invoice does not exist or belongs to another organisation. 429 rate_limitedThe organisation’s rate budget is exhausted.
Parameter In Type Required Description invoiceIdpath stringYes
Request example No request body
curl -X POST https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payment-link \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 "
const svar = await rieck . request ( " POST " , " /v1/invoices/9b2f1c1e-…/payment-link " );
"url" : " https://pay.rieckflow.com/p/RIE-7K3M2-Q9F4P " ,
"reference" : " order-2041 " ,
"paymentCode" : " RIE-7K3M2-Q9F4P " ,
200 Success envelope application/json
Response fields 4
Field Type Description data.urlurlHosted payment page for this invoice. data.referencestringReference used for reconciliation. data.paymentCodestringShort code the customer can type on the payment site. data.balanceOereintegerCurrent amount due when the link is requested.
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 invoice_not_foundThe invoice 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.
Your SERVER calls this with your secret key; your BROWSER only ever loads embedUrl. The reference is an unguessable capability that can pay exactly this one invoice — the client_secret model, with no publishable key to leak. Idempotent: the reference is minted once per invoice and reused. balanceOere is indicative only, because the gateway session is minted when the payer clicks, always on the CURRENT outstanding amount.
Request body fields 1
Field Type Required Description invoiceIdstringYes Field in the request payload.
Request example application/json
curl -X POST https://api.rieckflow.com/v1/checkout-sessions \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 " \
-H " Content-Type: application/json " \
"invoiceId": "9b2f1c1e-…"
const svar = await rieck . request ( " POST " , " /v1/checkout-sessions " , {
" invoiceId " : " 9b2f1c1e-… "
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"paymentDate" : " 2026-08-08 " ,
"source" : " bank_transfer " ,
"createdAt" : " 2026-08-08T12:05:44Z "
201 Success envelope application/json
Response fields 6
Field Type Description data.iduuidStable payment id. data.invoiceIduuidInvoice the payment belongs to. data.amountOereintegerPayment amount in øre. data.paymentDatedateBank value date. data.sourcestringHow the payment was registered. data.hasReceiptbooleanWhether a receipt can be downloaded.
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
Parameter In Type Required Description 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/payments \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/payments " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"paymentDate" : " 2026-08-08 " ,
"source" : " bank_transfer " ,
"createdAt" : " 2026-08-08T12:05:44Z "
200 Success envelope application/json
Response fields 7
Field Type Description data[].iduuidStable payment id. data[].invoiceIduuidInvoice the payment belongs to. data[].amountOereintegerPayment amount in øre. data[].paymentDatedateBank value date. data[].sourcestringHow the payment was registered. data[].hasReceiptbooleanWhether a receipt can be downloaded. 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.
Parameter In Type Required Description paymentIdpath stringYes
Request example No request body
curl https://api.rieckflow.com/v1/payments/9b2f1c1e-…/receipt \
-H " Authorization: Bearer $RIECK_API_KEY "
const svar = await rieck . request ( " GET " , " /v1/payments/9b2f1c1e-…/receipt " );
200 Success envelope application/pdf
Possible errors 4
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. 429 rate_limitedThe organisation’s rate budget is exhausted.
Manual registrations only, and only while the invoice is still the creditor’s own: 422 once it has been handed to collections, settled to the creditor, or its overpayment credit has been used. The registration’s Idempotency-Key is spent afterwards — re-register with a new one.
Parameter In Type Required Description paymentIdpath stringYes
Request example No request body
curl -X DELETE https://api.rieckflow.com/v1/payments/9b2f1c1e-… \
-H " Authorization: Bearer $RIECK_API_KEY " \
-H " Idempotency-Key: order-2041 "
const svar = await rieck . request ( " DELETE " , " /v1/payments/9b2f1c1e-… " );
"id" : " 9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440 " ,
"invoiceId" : " 5c0d10ec-f086-48c6-b1c7-b389a47ac6d1 " ,
"paymentDate" : " 2026-08-08 " ,
"source" : " bank_transfer " ,
"createdAt" : " 2026-08-08T12:05:44Z "
200 Success envelope application/json
Response fields 6
Field Type Description data.iduuidStable payment id. data.invoiceIduuidInvoice the payment belongs to. data.amountOereintegerPayment amount in øre. data.paymentDatedateBank value date. data.sourcestringHow the payment was registered. data.hasReceiptbooleanWhether a receipt can be downloaded.
Possible errors 7
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. 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.