Repository navigation
fix(payments): align retry and customer retry types with the spec - #701
Open
armando-rodriguez-cko wants to merge 1 commit into
Open
armando-rodriguez-cko wants to merge 1 commit into
armando-rodriguez-cko wants to merge 1 commit into
Conversation
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.
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 17 wall-e 2026.06.19-02 · policy |
🔬 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.
Kinds:
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the payment retry types with the API.
customerRetryon hosted payments and payment links only acceptsmax_attempts(0 to 5), but usedPaymentRetryRequest, theretryobject ofPOST /payments.PaymentRetryRequest.enabledwas deprecated although it is the required switch for asynchronous retries. The retry responses were missingattempts_madeand one of them reported amax_attemptsthe API did not return.Changes
payments/hosted/HostedPaymentRequest.java,payments/links/PaymentLinkRequest.java:customerRetrynow usesCustomerRetryhandlepaymentsandpayouts/flow/entities/CustomerRetry.java,flow/requests/PaymentSessionCreateRequest.java: docs aligned with the specpayments/request/PaymentRetryRequest.java:enabledno longer deprecated;maxAttemptsandendAfterDaysstay deprecated with an updated messagepayments/request/DunningRetryRequest.java,DowntimeRetryRequest.java,PaymentRequest.java: docs, required markers and ranges from the specpayments/response/PaymentRetryResponse.java:attemptsMadeadded, every field documented;PaymentResponseandGetPaymentResponseretrydocumentedpostpayments/.../retry/Retry.java:maxAttemptsno longer defaults to 6 when the API leaves it outCustomerRetrySerializationTest,PaymentRetryResponseSerializationTest,RetrySerializationTest(new),PaymentRetryRequestSerializationTest(rewritten with exact JSON assertions),TestHelperfixturesAPI Reference
POST /payments(retry): https://api-reference.checkout.com/tag/payments/POST/paymentsPOST /hosted-payments(customer_retry): https://api-reference.checkout.com/tag/hosted-payments-page/POST/hosted-paymentsPOST /payment-links(customer_retry): https://api-reference.checkout.com/tag/payment-links/POST/payment-linksPOST /payment-sessions(customer_retry): https://api-reference.checkout.com/tag/flow/POST/payment-sessionsGET /payments/{id}(retry,payment_ip): https://api-reference.checkout.com/tag/payments/GET/payments/%7Bid%7DBreaking changes
The
customerRetrybuilder onHostedPaymentRequestandPaymentLinkRequestnow takesCustomerRetryinstead ofPaymentRetryRequest. 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.