Embedded debt collection retry test matrix
Test normal submission, a lost response, duplicate delivery and a pending request with one invoice per Debitura Starter Integration fixture.
By Lars Holdgaard, Founder & CEO of Debitura

Before you offer a collection button in an invoicing app, check what the app shows when a request succeeds, the response gets lost, a notification repeats or the client still has a step to complete. A recovery path passes when the app finds and shows the right test request without submitting the invoice a second time.
Set up four synthetic invoices in Test
Use the authorized Referral Partner Test host, Test key and Test webhook subscription. Mark each synthetic invoice isTest: true and give it a fresh creditor reference for each run. Keep one invoice per Starter request. For tests 1 to 3, use a linked test client and eligible invoices with no setup or correction pending. For test 4, prepare an otherwise eligible invoice for an existing test client that has yet to approve the partner connection and needs no other setup. Record request IDs, returned case IDs, current status and local update counts. Keep keys, signatures, personal details and live invoices out of the run record.
Four acceptance tests
| Fixture | What to do | Expected count | What the person sees | Pass evidence |
|---|---|---|---|---|
| 1. Normal submit TEST-INV-101 | Submit the prepared invoice once with a new idempotency key. Read the resulting request by ID. | One request. One case after submission completes. | Submitted and an available case link. Show the returned case status separately from submission. | Returned request ID, current read, same invoice reference and one case ID. The UI shows the status for that invoice. |
| 2. Response lost after acceptance TEST-INV-102 | Have your test harness record a submitted receipt with its request and case IDs, then discard that response on the way back to the client. Recover by test client and invoice reference. For the replay check, use the same key and unchanged request within 24 hours. | One request and one case. The replay returns the original response. | Show an uncertain result until a current read succeeds. Then show the state from that read. | Original, replayed and recovered IDs match. The recorder observes one distinct case ID and the client uses no fresh key for this recovery. |
| 3. Repeated delivery TEST-INV-103 | After the prepared invoice has been submitted, deliver the same signed Test event twice to your test handler. Verify the signature and deduplicate by event ID. On the first delivery, refresh the request. | Two deliveries. One local application of the update. The existing request and case counts stay at one each. | The invoice keeps a single status update for that event. | One distinct event ID, one applied update, matching current request and case IDs, and no submission initiated by the handler. |
| 4. Pending request, update missed TEST-INV-104 | Start with a request waiting for connection approval. Have the authorized Test user approve the hosted step while ignoring that event in the test client. Refresh the original request by ID as it progresses. | One request throughout. Zero cases while the connection approval is pending, then one when the prepared invoice completes submission. | Show the connection approval action from the returned URL while requested. On a current read after completion, show the returned submitted state and case link when available. Keep an intermediate state visible until it changes. | Before-and-after reads of the same request ID, the observed transition and one case ID. The client made no new submission to check progress. |
| Fixture | Stimulus | Expected request count | Expected case count | Expected UI | Pass evidence | Observed evidence | Result |
|---|---|---|---|---|---|---|---|
| TEST-INV-101 | Submit once with new key and read by request ID | 1 | 1 after submission | Submitted with case link and separate returned case status | Response and current read for the same invoice, request ID and one case ID | ||
| TEST-INV-102 | Record a submitted receipt with request and case IDs in the harness; discard the client response; look up by client and reference; replay same key and body within 24 hours | 1 | 1 | Uncertain until current read | Original, replayed and recovered IDs match; one case ID; no fresh key | ||
| TEST-INV-103 | Deliver the same signed Test event twice; verify signature, deduplicate and refresh on first delivery | 1 unchanged | 1 unchanged | One applied status update | Two deliveries, one event ID, one applied update; current IDs match; no submission from handler | ||
| TEST-INV-104 | Complete hosted connection approval; ignore the update and refresh by request ID | 1 throughout | 0 before approval; 1 after submission | Approval action then current state and case link when available | Before and after reads for same request ID, observed transition, one case ID after submission; no fresh submit |
Use a current read for progress
A replay can return an earlier snapshot. Use the current request read after a timeout, a return from hosted setup or a missed update. A local event fixture tests your handler. Verify real Test delivery separately before relying on it. Keep the response body’s status as the source for which state or action the invoice shows.
Use the current Starter Integration guide for request and retry semantics and the starter testing checklist for the wider release suite. If you are evaluating this flow for your software, see the Debitura referral partner program.
-min.webp)
Sign up to our newsletter
Get updated on best practices, tips and tricks about international debt collection and accounts receivable management.

.webp)