Skip to content

feat(check-payments): reprocess a check marked for return - #94

Merged
samuelvasco merged 1 commit into
masterfrom
eng-6568-check-payment-reprocess
Nov 17, 2026
Merged

samuelvasco merged 1 commit into
masterfrom
eng-6568-check-payment-reprocess

Conversation

@samuelvasco

@samuelvasco samuelvasco commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Human description

Adds CheckPaymentResource.reprocess, which posts to check-payments/{id}/reprocess. Unit support confirmed (Zendesk case 169500) that a checkbook check presented with insufficient funds can be paid by funding the account and calling this endpoint while the check is still MarkedForReturn. The api needs it to extend Balance Protection to checkbook checks.

Related to https://linear.app/trusspayments/issue/ENG-6568/spike-balance-protection-for-checks

AI description

Agent-authored with Claude Code.

Summary

One new method on CheckPaymentResource, shaped like cancel (POST, no body) and like ReceivedPaymentResource.reprocess. It decodes the returned checkPayment or returns UnitError.

Correctness vs root cause

Adds a missing endpoint. No existing behaviour changes.

Scope / pattern fit

Additive. Follows the neighbouring resource methods and the mocked-requests test style of e2e_tests/test_account_lookup.py.

Security

None. Same org token and scope (check-payments-write) as approve and return_check.

Performance

None.

Concurrency

None.

Observability

Unchanged.

Decisions

  • No request body: Unit support described a bare POST, and received-payments/{id}/reprocess has none either.
  • Unit's public API reference does not list this endpoint, so the api adds a sandbox scenario (check_e2e run --scenario funded_nsf_check_reprocess_pays) that must pass before the api change merges.

Risks

Low. If Unit expects a body, the call returns a UnitError and the api lets the check be returned as it is today.

Verification

  • python -m unittest e2e_tests.test_check_payment_reprocess -v: 2 tests OK (URL and empty body, DTO decode, UnitError path).
  • Not run against the Unit sandbox yet; that is the api scenario above.

Rollout

The api pins this branch's commit (ed62e92). If this PR is squashed, the api pin must move to the merge commit on master before the api PR merges.

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator Author

How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@samuelvasco
samuelvasco marked this pull request as ready for review November 17, 2026 13:28
devin-ai-integration[bot]

This comment was marked as resolved.

Adds CheckPaymentResource.reprocess, which posts to
check-payments/{id}/reprocess. Unit support confirmed (Zendesk case
169500) that a check presented with insufficient funds can be paid by
funding the account and calling this endpoint while the check is still
MarkedForReturn. The api needs it to extend Balance Protection to
checkbook checks (ENG-6568).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samuelvasco
samuelvasco force-pushed the eng-6568-check-payment-reprocess branch from ed62e92 to bb1e737 Compare November 17, 2026 16:11
@samuelvasco
samuelvasco merged commit 971f5f8 into master Nov 17, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants