Skip to content

Payments

GET /v1/customers/{customerId}/credit-balance

Section titled “GET /v1/customers/{customerId}/credit-balance”

Customer credit balance

payments:read

What the customer has to their credit — from credit notes on paid invoices, or from OVERPAYMENTS. Append-only ledger; the balance is the sum.

ParameterInTypeRequiredDescription
customerIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/credit-balance \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Never negative. movements[].type is arose | offset | refund_declared.application/json
Response fields 2
FieldTypeDescription
data.balanceOereintegerCustomer credit available for refund or offset.
data.movementsobject[]Append-only credit ledger, newest first.
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Declare a refund

payments:write

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.

ParameterInTypeRequiredDescription
customerIdpathstringYes
Request body fields 2
FieldTypeRequiredDescription
amountOereintegerYesAmount in integer øre. 125000 means DKK 1,250.00.
reasonstringNoField in the request payload.
Request exampleapplication/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" \
-d '{
"amountOere": 125000,
"reason": "Ordered by mistake"
}'
200 Success envelopeapplication/json
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.
404customer_not_foundThe customer 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": {
"amountOere": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
}
},
"required": [
"amountOere"
],
"additionalProperties": false
}

List invoice payments

payments:read
ParameterInTypeRequiredDescription
invoiceIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payments \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 6
FieldTypeDescription
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
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.
404invoice_not_foundThe invoice does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Register manual payment

payments:write

Your Idempotency-Key IS the bookkeeping key — the same key never registers twice.

ParameterInTypeRequiredDescription
invoiceIdpathstringYes
Request body fields 2
FieldTypeRequiredDescription
amountOereintegerYesAmount in integer øre. 125000 means DKK 1,250.00.
paymentDatestringYesField in the request payload.
Request exampleapplication/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" \
-d '{
"amountOere": 125000,
"paymentDate": "2026-08-15"
}'
201 Success envelopeapplication/json
Response fields 8
FieldTypeDescription
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
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.
404invoice_not_foundThe invoice 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": {
"amountOere": {
"type": "integer",
"minimum": 1,
"maximum": 100000000000
},
"paymentDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"amountOere",
"paymentDate"
],
"additionalProperties": false
}

Get payment link

payments:read
ParameterInTypeRequiredDescription
invoiceIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/invoices/9b2f1c1e-…/payment-link \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 4
FieldTypeDescription
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
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.
404invoice_not_foundThe invoice does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/invoices/{invoiceId}/payment-link

Section titled “POST /v1/invoices/{invoiceId}/payment-link”

Mint payment link (idempotent)

payments:write
ParameterInTypeRequiredDescription
invoiceIdpathstringYes
Request exampleNo 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"
200 Success envelopeapplication/json
Response fields 4
FieldTypeDescription
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
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.
404invoice_not_foundThe invoice 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.

Mint a checkout session for your own UI

payments:write

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
FieldTypeRequiredDescription
invoiceIdstringYesField in the request payload.
Request exampleapplication/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" \
-d '{
"invoiceId": "9b2f1c1e-…"
}'
201 Success envelopeapplication/json
Response fields 6
FieldTypeDescription
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
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": {
"invoiceId": {
"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)$"
}
},
"required": [
"invoiceId"
],
"additionalProperties": false
}

List payments (org-wide)

payments:read
ParameterInTypeRequiredDescription
limitqueryintegerNoPage size, 1-200 (default 50)
cursorquerystringNoOpaque cursor from meta.nextCursor
Request exampleNo request body
curl https://api.rieckflow.com/v1/payments \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 7
FieldTypeDescription
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`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.

Receipt PDF

payments:read
ParameterInTypeRequiredDescription
paymentIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/payments/9b2f1c1e-…/receipt \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/pdf
Possible errors 4
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.
429rate_limitedThe organisation’s rate budget is exhausted.

Undo a manually registered payment

payments:write

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.

ParameterInTypeRequiredDescription
paymentIdpathstringYes
Request exampleNo request body
curl -X DELETE https://api.rieckflow.com/v1/payments/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Response fields 6
FieldTypeDescription
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
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.
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.