Skip to content

fix(payments): align retry and customer retry types with the spec - #701

Open
armando-rodriguez-cko wants to merge 1 commit into
masterfrom
fix/INT-1748-retry-types
Open

armando-rodriguez-cko wants to merge 1 commit into
masterfrom
fix/INT-1748-retry-types

Conversation

@armando-rodriguez-cko

Copy link
Copy Markdown
Contributor

Summary
Aligns the payment retry types with the API. customerRetry on hosted payments and payment links only accepts max_attempts (0 to 5), but used PaymentRetryRequest, the retry object of POST /payments. PaymentRetryRequest.enabled was deprecated although it is the required switch for asynchronous retries. The retry responses were missing attempts_made and one of them reported a max_attempts the API did not return.

Changes

  • payments/hosted/HostedPaymentRequest.java, payments/links/PaymentLinkRequest.java: customerRetry now uses CustomerRetry
  • handlepaymentsandpayouts/flow/entities/CustomerRetry.java, flow/requests/PaymentSessionCreateRequest.java: docs aligned with the spec
  • payments/request/PaymentRetryRequest.java: enabled no longer deprecated; maxAttempts and endAfterDays stay deprecated with an updated message
  • payments/request/DunningRetryRequest.java, DowntimeRetryRequest.java, PaymentRequest.java: docs, required markers and ranges from the spec
  • payments/response/PaymentRetryResponse.java: attemptsMade added, every field documented; PaymentResponse and GetPaymentResponse retry documented
  • postpayments/.../retry/Retry.java: maxAttempts no longer defaults to 6 when the API leaves it out
  • Tests: CustomerRetrySerializationTest, PaymentRetryResponseSerializationTest, RetrySerializationTest (new), PaymentRetryRequestSerializationTest (rewritten with exact JSON assertions), TestHelper fixtures

API Reference

Breaking changes
The customerRetry builder on HostedPaymentRequest and PaymentLinkRequest now takes CustomerRetry instead of PaymentRetryRequest. This is forced by the API, so it ships in a minor release. Retry.getMaxAttempts() on the request payment response now returns null when the API omits the field instead of 6.

README
Not affected: the README does not document these types.

customer_retry on POST /hosted-payments and POST /payment-links only
accepts max_attempts (0 to 5), so it now uses CustomerRetry instead of
PaymentRetryRequest. PaymentRetryRequest.enabled is no longer deprecated:
it is the required switch for asynchronous retries on POST /payments.
The payment retry response gains attemptsMade, and the request payment
retry response no longer reports a max_attempts the API did not return.
@armando-rodriguez-cko
armando-rodriguez-cko requested a review from a team October 27, 2026 12:02
@agent-wall-e

agent-wall-e Bot commented Oct 27, 2026

Copy link
Copy Markdown

🟢 Risk Classification: LOW

Approval route: AI Auto-Approval
Rollback controls: Automated Instant Rollback + feature flags

Classification reasons

  • no_low_class_matched
  • prod_source_modified
  • 2.2.6_logical_extension:All changes are non-destructive doc/type alignment fixes (swapping one existing type for another, adding missing response fields, un-deprecating a field, removing a default value) that reuse existing code paths and abstractions without introducing new endpoints, external integrations, persisted data, auth changes, or background processes.

Operational gates

  • ✅ jira_ticket (INT-1748)
  • ✅ independent_review

Files analysed: 17


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Oct 27, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
no_low_class_matched informational §2.2 (fall-through) None of the deterministic Low classes (§2.2.3, §2.2.4, §2.2.7, docs-only) applied; classifier fell through to LLM evaluation.
prod_source_modified informational §2.1 M7 (informational) At least one file is non-doc, non-test, non-IaC — i.e. application source code was modified.
2.2.6_logical_extension — All changes are non-destructive doc/type alignment fixes (swapping one existing type for another, adding missing response fields, un-deprecating a field, removing a default value) that reuse existing code paths and abstractions without introducing new endpoints, external integrations, persisted data, auth changes, or background processes. classifying §2.2.6 Sonnet 4.6 evaluator promoted minor → low: the change reuses existing code paths and does not cross a trust boundary.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

Comment on lines +74 to +77
final PaymentRetryRequest request = PaymentRetryRequest.builder()
.enabled(true)
.maxAttempts(4)
.endAfterDays(10)
Comment on lines +74 to +76
final PaymentRetryRequest request = PaymentRetryRequest.builder()
.enabled(true)
.maxAttempts(4)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants