orders:write Orders & fulfillment Allows only reporting sales and fulfillment data.
API
POST /orders sends orders, POST /fulfillments reports shipping. Rechnungskit turns them into validated ZUGFeRD e-invoices (PDF with embedded XML), archives them under the German GoBD bookkeeping rules and prepares the DATEV export for your tax advisor. Bearer auth, integer cents, idempotent through your orderNo. PDF and XML via GET.
curl https://api.rechnungskit.de/v1/orders \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: order:CM-10482:v1" \
-H "Content-Type: application/json" \
-d '{
"orderNo": "CM-10482",
"paymentRef": "pi_3PqK8w2eZvKYlo2C",
"currency": "EUR",
"requiresShipping": false,
"billingAddress": {
"name": "Lisa Brandt",
"street": "Torstraße 99",
"postal_code": "10119",
"city": "Berlin",
"country_code": "DE"
},
"service_period": {
"start_date": "2026-06-01",
"end_date": "2026-06-30"
},
"items": [{
"name": "Monatsabo Pro · Juni 2026",
"sku": "saas-pro",
"quantity": 1,
"unitNetCents": 4118,
"discountNetCents": 500,
"taxRate": 19
}]
}'{
"data": {
"id": "6d754aec-40d9-4c1a-a78c-50dbb6c8e307",
"orderNo": "CM-10482",
"status": "created"
},
"requestId": "9d61558e-3c00-465d-b980-c074db600047"
} https://api.rechnungskit.de/v1Authorization: Bearer rk_key_…application/json · integer centsRequired are orderNo, billingAddress with country_code and at least one line item. Amounts are always whole cents. There is no "paid" field: the payment provider reports the payment status.
Quickstart
Create a project-bound key under Connections → API and AI assistants in the app. The full key is shown exactly once and belongs only in your backend or secret manager.
orders:write Orders & fulfillment Allows only reporting sales and fulfillment data.
invoices:read Status & documents Allows reading invoice metadata, PDF and XML.
Integration flow
You never need an internal Rechnungskit ID. Use an orderNo that stays unique for good. If the customer pays through Stripe, Mollie or another provider, also send that provider's unique paymentRef.
Your orderNo becomes the stable key that links everything.
The payment webhook is matched on paymentRef. Only physical goods (requiresShipping: true) wait for fulfillment. SaaS and digital services skip this step, and the invoice is created as soon as the payment arrives.
GET /v1/orders/{orderNo} returns the invoices linked to the order.
Save the returned invoice UUID or invoice number for this document.
PDF and XML stay behind Bearer auth, so your server fetches them.
1 · Order
Every POST needs a stable Idempotency-Key. After a timeout, you can repeat the same request with the same key without creating a second order.
requiresShipping (the default is false). There is then no fulfillment wait, and step 2 (/v1/fulfillments) drops out entirely. Send paymentRef along. As soon as the payment from your payment provider matches the order, the invoice is created automatically. There is no "paid" field on purpose, because the connected payment provider reports the payment status.POST /v1/orderscurl https://api.rechnungskit.de/v1/orders \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: order:CM-10482:v1" \
-H "Content-Type: application/json" \
-d '{
"orderNo": "CM-10482",
"paymentRef": "pi_3PqK8w2eZvKYlo2C",
"currency": "EUR",
"requiresShipping": false,
"billingAddress": {
"name": "Lisa Brandt",
"street": "Torstraße 99",
"postal_code": "10119",
"city": "Berlin",
"country_code": "DE"
},
"service_period": {
"start_date": "2026-06-01",
"end_date": "2026-06-30"
},
"items": [{
"name": "Monatsabo Pro · Juni 2026",
"sku": "saas-pro",
"quantity": 1,
"unitNetCents": 4118,
"discountNetCents": 500,
"taxRate": 19
}]
}'Order accepted{
"data": {
"id": "6d754aec-40d9-4c1a-a78c-50dbb6c8e307",
"orderNo": "CM-10482",
"status": "created"
},
"requestId": "9d61558e-3c00-465d-b980-c074db600047"
}data.id returned here is the internal order ID, not the invoice ID that comes later. For your own flow, CM-10482 stays the reference that counts.| Field | Type | Notes |
|---|---|---|
orderNo | string | Unique within your project, permanently |
billingAddress | object | Country always; the full address for regular invoices |
items[] | array | At least one line item |
unitNetCents or unitGrossCents | integer | All amounts in cents, never decimals |
| Field | Type | Notes |
|---|---|---|
billingAddress.leitweg_id | string? | Only for public-sector buyers (authorities, municipalities, universities): their Leitweg-ID, the routing ID German public bodies use to receive e-invoices. If it is set, the invoice for this order is created as XRechnung 3.0 (the German public-sector e-invoice format: pure XML with a PDF copy for reading) instead of ZUGFeRD. Format: 2 to 12 digits, an optional sub-address and a two-digit check number, separated by hyphens (e.g. 04011000-1234512-68). If the ID is formally invalid, the API answers with 422 and field: "billingAddress.leitweg_id". The invoice contact must have a phone number (XRechnung rule BR-DE-6); without one, Rechnungskit holds the invoice back as a task |
discountNetCents | integer? | Net discount per line item (ZUGFeRD BG-27); the unit price stays undiscounted. Only for real discounts. Redeemed credit is a payment method, never a discount |
shippingGrossCents | integer? | Shipping as the customer paid it (gross). Rechnungskit treats shipping as an ancillary service and determines its VAT; carts with mixed VAT rates are split by their gross ratio (Federal Fiscal Court, BFH XI R 22/22). Alternatively, send shippingNetCents + shippingTaxRate if your checkout already calculates the VAT on shipping |
paymentRef | string? | Unique provider reference for payment matching |
requiresShipping | boolean? | true holds physical goods back until fulfillment |
service_period | object? | Service period for time-based services (SaaS, subscriptions): start_date and end_date as ISO dates (YYYY-MM-DD), both or neither. It sets the deferred revenue (pRAP, the German deferred income item) directly and takes precedence over the product default. A start_date before the invoice date is allowed. If it falls in an earlier (usually closed) financial year and you use accrual accounting, Rechnungskit creates a review task (to assign the revenue to the prior year) but still creates the invoice. Without service_period and without a SaaS default on the product, accrual accounting creates no invoice yet: the order waits as the task "Product without revenue recognition" until you set the revenue recognition on the product or send the period later. With cash-basis accounting (EÜR) this does not apply, and the revenue counts right away |
creditRedemptions | array? | Redeemed referral credit: [{ "type": "referral_credit", "amountCents": 1000, "externalRef": "tx_81"
}]. Credit is a payment, not a discount: the invoice shows VAT on the full amount and marks the credit share as paid, and your payment provider collects only the rest. Requires grossTotalCents; the sum must not exceed it. If the credit covers everything (sum = grossTotalCents, financialStatus "paid"), the invoice is created without an incoming payment |
2 · Fulfillment
For physical goods, the shipping date is the date of supply that counts. So report the complete shipment. Partial fulfillments do not produce a complete invoice yet.
requiresShipping (the default is false) there is no fulfillment wait: the invoice is created as soon as the payment from the payment provider matches the order. POST /v1/orders with paymentRef is then the only call you need; /v1/fulfillments is never called. There is no "paid" field on purpose, because the connected payment provider reports the payment status.POST /v1/fulfillmentscurl https://api.rechnungskit.de/v1/fulfillments \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: fulfillment:CM-10482:fulfilled:v1" \
-H "Content-Type: application/json" \
-d '{
"orderNo": "CM-10482",
"status": "fulfilled",
"shippedAt": "2026-07-27T10:30:00Z",
"trackingNumber": "003404341612"
}'3 · Status & documents
Ask for the status with your own order number. Once an invoice exists, invoices[] contains its UUID, invoice number and archive status.
GET /v1/orders/CM-10482curl https://api.rechnungskit.de/v1/orders/CM-10482 \ -H "Authorization: Bearer $RK_API_KEY"
Invoice found{
"data": {
"orderNo": "CM-10482",
"status": "invoiced",
"fulfillmentStatus": "fulfilled",
"invoices": [{
"id": "f77ba43d-6f06-4b84-bd24-5cfab76a1192",
"number": "RK-2026-0148",
"status": "archived",
"url": "/v1/invoices/f77ba43d-6f06-4b84-bd24-5cfab76a1192"
}]
},
"requestId": "3a61c30d-4386-4c60-9354-841342cbc372"
}Then use the UUID whenever you want to download one specific document. It stays unambiguous after a cancellation or when an order has several documents.
GET /v1/invoices/{id}/pdfcurl https://api.rechnungskit.de/v1/invoices/f77ba43d-6f06-4b84-bd24-5cfab76a1192/pdf \ -H "Authorization: Bearer $RK_API_KEY" \ --output RK-2026-0148.pdf
/invoices/CM-10482 always returns the order’s invoice, never silently the cancellation invoice. Fetch the cancellation invoice by its UUID from invoices[] or from the list below.GET /v1/orders/{orderNo} only knows orders you send through the API. For orders from a shop connection (WooCommerce, Shopify, Shopware …), GET /v1/invoices?orderNo=… returns every document of the order, newest first. type is invoice, correction (cancellation invoice) or voucher_receipt. Up to 100 documents per page with limit=100 (default 25); if pagination.hasMore is true, fetch the next page with cursor.
GET /v1/invoices?orderNo=7168curl "https://api.rechnungskit.de/v1/invoices?orderNo=7168&limit=100" \ -H "Authorization: Bearer $RECHNUNGSKIT_API_KEY"
Invoice and partial cancellation (shortened){
"data": [
{
"id": "0c1d6f2e-5a43-4b0e-9d61-2f7a8b9c0d11",
"number": "RK-S-2026-0007",
"type": "correction",
"documentType": "standard",
"status": "archived",
"issueDate": "2026-11-12",
"totals": { "netCents": -840, "taxCents": -160, "grossCents": -1000 },
"references": { "orderNo": "7168", "paymentRef": null },
"documents": {
"pdf": "/v1/invoices/0c1d6f2e-5a43-4b0e-9d61-2f7a8b9c0d11/pdf",
"xml": "/v1/invoices/0c1d6f2e-5a43-4b0e-9d61-2f7a8b9c0d11/xml"
}
},
{
"id": "f77ba43d-6f06-4b84-bd24-5cfab76a1192",
"number": "RK-2026-0815",
"type": "invoice",
"documentType": "standard",
"status": "archived",
"issueDate": "2026-11-05",
"totals": { "netCents": 2000, "taxCents": 380, "grossCents": 2380 },
"references": { "orderNo": "7168", "paymentRef": null },
"documents": {
"pdf": "/v1/invoices/f77ba43d-6f06-4b84-bd24-5cfab76a1192/pdf",
"xml": "/v1/invoices/f77ba43d-6f06-4b84-bd24-5cfab76a1192/xml"
}
}
],
"pagination": { "limit": 100, "hasMore": false, "nextCursor": null }
}Alternative · Pay by invoice
When a customer buys on invoice, there is no provider payment at first. Instead, send the gateway name you approved in Rechnungskit under Connect. Once fulfillment is complete, the invoice is created as an open item with a payment term.
POST /v1/orders{
"orderNo": "CM-10483",
"paymentGateway": "invoice",
"financialStatus": "pending",
"requiresShipping": true,
"billingAddress": { "...": "full billing address" },
"items": [ "..." ]
}paymentGateway must exactly match a gateway enabled under Connect → Pay by invoice. Without a matching payment or an approved invoice-first gateway, the order stays without an invoice, on purpose.Store credit · Push
If your application manages credit itself, for example referral rewards, send every movement to POST /v1/credit-transactions: earning (earn), redeeming (redeem), reversal (reverse), payout (payout) and expiry (expire). Each transaction carries your unique id, so repeating a call never creates anything twice. Up to 500 per call.
POST /v1/credit-transactions{
"transactions": [
{
"id": "tx_81",
"type": "earn",
"email": "kundin@example.com",
"amount_cents": 500,
"occurred_at": "2026-10-02T09:14:00+02:00",
"order_ref": "103002"
},
{
"id": "tx_82",
"type": "redeem",
"email": "kundin@example.com",
"amount_cents": 500,
"occurred_at": "2026-10-05T18:40:00+02:00",
"order_ref": "103950"
}
]
}200{ "accepted": 2, "duplicates": 0, "applied": 1 }Once a day, report the balance per customer to PUT /v1/credit-balances ({ "balances": [{ "email": "…", "balance_cents": 1250 }] }). Rechnungskit compares them with the history and creates a task when a customer's balance differs. That way, a lost message gets noticed too.
creditRedemptions so the invoice shows it as paid. Details: Taking over credit from your own shop.Expenses
The same flows as under Ausgaben (Expenses) in the app, from your own system. Writing calls need a key with the payables:write permission and an Idempotency-Key; reading calls work with documents:read.
The original goes along as a binary part of a multipart/form-data request (PDF, XML, PNG or JPEG, at most 15 MB, never as base64 in a text field). Rechnungskit archives it unchanged, reads it and puts it up for approval. Approval always happens in the app. A duplicate is stored too and answered with status: "duplicate" and duplicateOfId .
POST /v1/purchase-documentscurl https://api.rechnungskit.de/v1/purchase-documents \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: beleg:RB-2026-1187" \
-F "file=@RB-2026-1187.pdf;type=application/pdf" \
-F 'metadata={"counterpartyExternalId":"sup-roestwerk","documentNumber":"RB-2026-1187","documentDate":"2026-11-02","dueDate":"2026-11-16","grossCents":110230}'201{
"id": "07d49186-29ee-4ba7-a8e6-190de8a22073",
"internalNumber": "ER-2026-0042",
"status": "received",
"kind": "invoice",
"documentNumber": "RB-2026-1187",
"grossCents": 110230,
"duplicateOfId": null,
"original": { "contentType": "application/pdf", "sha256": "9f2c…" }
}When a person (a volunteer, an employee) paid a receipt out of pocket, send it with reimbursement.payeeExternalId (create the person first with POST /v1/counterparties, private, with IBAN) and your externalRef. The same reference always answers the same document (200). After the reading the document carries completeness (issuer, date, item, amount, proof of payment). Approval happens in the app, by two people depending on the four-eyes threshold. Rechnungskit bundles the approved receipts per person into one expense claim (AA number) and pays it with one transfer in a payment run. The webhooks purchase_document.extracted, .approved, .rejected and .paid report each step with your reference. Guide (in German).
POST /v1/purchase-documentscurl https://api.rechnungskit.de/v1/purchase-documents \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: beleg:6555e9b4" \
-F "file=@kassenbon.jpg;type=image/jpeg" \
-F 'metadata={"kind":"receipt","externalRef":"6555e9b4","reimbursement":{"payeeExternalId":"helfer-anna"},"purpose":"Kolonie Hafen / Futter","grossCents":8500}'For commissions, purchases of used goods or creators' services. You name the recipient by its ID or your externalId; with more master data the call creates or updates it. The tax follows from the recipient's tax status, never from the request. A private individual gets a commission statement. A second request with the same reference returns the existing self-billing invoice (200 instead of 201) and sends no second email.
POST /v1/self-billingcurl https://api.rechnungskit.de/v1/self-billing \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: payout-2026-10-1042" \
-H "Content-Type: application/json" \
-d '{
"counterparty": {
"externalId": "aff-1042",
"name": "Kaffeeblog Hansen",
"street": "Mühlenkamp 31",
"postalCode": "22303",
"city": "Hamburg",
"countryCode": "DE",
"taxStatus": "regel",
"taxNumber": "43/123/45678",
"email": "jonas@kaffeeblog-hansen.example",
"accountHolder": "Jonas Hansen",
"iban": "DE12500105170648489890",
"selfBillingAgreedAt": "2026-03-01"
},
"servicePeriod": { "start": "2026-10-01", "end": "2026-10-31" },
"lines": [
{ "description": "Provision Oktober 2026", "netCents": 41800, "taxRate": 19 }
],
"reference": "payout-2026-10-1042"
}'Approved incoming documents, self-billing invoices and commission statements become a SEPA file (pain.001.001.09) that you upload in your online banking. Rechnungskit itself transfers nothing. Send documentIds or dueUntil; afterwards you download the file from GET /v1/payment-runs/{id}/file.
POST /v1/payment-runscurl https://api.rechnungskit.de/v1/payment-runs \
-X POST \
-H "Authorization: Bearer $RK_API_KEY" \
-H "Idempotency-Key: zahllauf:2026-11-14" \
-H "Content-Type: application/json" \
-d '{ "dueUntil": "2026-11-14", "skonto": true }'Reference
/api/health Process and database status
public/v1 API discovery and the available endpoints
public/v1/orders Create or update an order, idempotently
orders:write/v1/orders/{orderNo} Get the order, fulfillment and invoice status
invoices:read/v1/fulfillments Report shipping or service delivery
orders:write/v1/invoices Filter invoices and page through them with a cursor
invoices:read/v1/invoices/{reference} Metadata by UUID, invoice number, order number or payment reference
invoices:read/v1/invoices/{reference}/pdf Download the archived PDF
invoices:read/v1/invoices/{reference}/xml Download the archived EN 16931 XML
invoices:read/v1/proforma/{reference} Proforma invoice of an open order as a PDF
invoices:read/v1/proforma/{reference}/send Send the payment request with the proforma invoice to the customer
orders:write/v1/credit-transactions Report credit movements (push), exactly once per id
orders:write/v1/credit-balances Report the balance per customer for reconciliation
orders:write/v1/purchase-documents Hand over an incoming document (file as multipart, optional metadata)
payables:write/v1/purchase-documents?externalRef=… Find an incoming document by your own reference
documents:read/v1/purchase-documents/{id} Status, amounts, expense account and archive hash of an incoming document
documents:read/v1/purchase-documents/{id}/payment How an incoming document is paid: suggestion, source, consequences (POST answers)
documents:read/v1/counterparties Create or update a business partner (supplier or self-billing recipient)
payables:write/v1/counterparties/{id}/tax-scenario A business partner's tax case; PUT fixes or confirms it
documents:read/v1/self-billing Issue a self-billing invoice (ZUGFeRD, type code 389) or a commission statement
payables:write/v1/self-billing/{number} Get a self-billing invoice, plus /pdf and /xml
documents:read/v1/self-billing/{number}/cancel Cancel a self-billing invoice (type code 261)
payables:write/v1/payment-runs Create a payment run: SEPA file pain.001 from approved documents
payables:write/v1/payment-runs/{id}/file Download the archived SEPA file
documents:read/v1/payment-runs/{id}/paid Mark the transfers of a payment run as paid
payables:write/v1/donation-receipts?paymentRef=… Donation receipts for a donation, including withdrawals
documents:read/v1/donation-receipts/{number}/pdf Download a donation receipt as a PDF
documents:read/v1/donations/donor Send a donor's name and address after the payment
donations:writeFor German nonprofits: Donation receipts via the API (Stripe Checkout, donor address, polling, PDF)
Machine-readable reference: Download OpenAPI 3.1 ↗
Errors & retries
The X-Request-Id header and the JSON field requestId identify the same request. You can find it in your project's API activity for 30 days.
validation_failed{
"error": {
"code": "validation_failed",
"message": "billingAddress.country_code is required for VAT determination",
"field": "billingAddress.country_code"
},
"requestId": "9d61558e-3c00-465d-b980-c074db600047"
}| Status | Meaning | What to do |
|---|---|---|
400/422 | Invalid request or field values | Do not retry blindly; fix the data first |
401/403 | Invalid key or missing scope | Check the key and its scopes |
404 | Order or invoice does not exist yet | In an asynchronous flow, check again with backoff |
409 | Conflict, or the document is not archived yet | Read the error code and fetch again later |
429/503 | Temporarily unavailable | Retry-After header: wait that long, then back off exponentially |
5xx | Transient server error (for example during a deployment) | Required: retry with backoff for at least 24 hours |
orderNo, and the Idempotency-Key header deduplicates parallel deliveries. We also recommend a daily reconciliation job that resends everything your system marked as failed. The classic failure: the payment arrives because the payment provider retries it, while your own order push fails on a single 502 and is never retried. Then the invoice cannot be created.Sandbox
Every account starts in test mode, with the same API, the same pipeline and the same rk_key_… key as in production, including EN 16931 validation and PDF/A-3 rendering. So you test exactly the behavior that runs live later, with the key that also works live.
TEST-2026-0001 Separate number range Test invoices are clearly marked as test documents, in both PDF and XML, and use their own TEST number range.
€0.00 Not billed Test invoices do not count toward your bill and do not appear in the DATEV export or in OSS (EU One-Stop Shop) or EC Sales List reports.
isolated No sending, no effect Sending invoices is blocked in the sandbox. Test invoices have no tax effect, and you can discard them at any time with a reset.
Security
status: ok confirms the process, db: true also confirms the database connection. Check both values, not just HTTP 200.
Ready?
Each key belongs to one project, and the full key is shown only once.