Repository navigation
fix(payments): send max_attempts in customer_retry - #400
armando-rodriguez-cko wants to merge 3 commits into
Conversation
customer_retry on POST /hosted-payments, POST /payment-links and POST /payment-sessions was typed as PaymentRetryRequest, which cannot carry max_attempts. It now uses the new CustomerRetry type, matching the API. Retry request docs are aligned with the spec.
🔴 Risk Classification: MAJORApproval route: AI Review + Human Approval Required Classification reasons
Operational gates
Files analysed: 6 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 |
🟢 Advisory review: Looks good to meThis PR still needs a human approval — wall-e cannot auto-approve it. For what it's worth, I read the diff and found nothing I'd block on. Introduces a dedicated What I checked
This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02 |
🔴 Risk Classification: MAJORApproval route: AI Review + Human Approval Required Classification reasons
Operational gates
Files analysed: 7 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 |
|



Summary
customer_retryonHostedPaymentsSessionRequest,PaymentLinkRequestandPaymentSessionsRequestwas documented asPaymentRetryRequest, theretryobject ofPOST /payments. Code that followed the documented type sentenabled,dunninganddowntime, which the API rejects incustomer_retry, and had no typed way to setmax_attempts; the limit could only be sent by assigning a raw array or an untyped object. It now uses a dedicatedCustomerRetryclass withmax_attempts(0 to 5, default 5).Changes
lib/Checkout/Payments/Request/CustomerRetry.php: new class withmax_attempts.HostedPaymentsSessionRequest,PaymentLinkRequest,PaymentSessionsRequest:customer_retrydocumented asCustomerRetry.PaymentRetryRequest: stays as theretryobject ofPaymentRequest, now with a class description.HostedPaymentsSessionRequest,PaymentLinkRequest,PaymentRequestandPaymentSessionsRequest: description, required or optional, format, pattern, length, range, enum and deprecation.test/.../RetryRequestsSerializationTest.php:PaymentRetryRequest(all properties,enabledfalse, only spec properties),CustomerRetrywith the swagger example, andmax_attemptsincluding 0 on all three endpoints.API Reference
POST /payments(retry): https://api-reference.checkout.com/tag/payments/POST/payments.body.retryPOST /hosted-payments(customer_retry): https://api-reference.checkout.com/tag/hosted-payments-page/POST/hosted-payments.body.customer_retryPOST /payment-links(customer_retry): https://api-reference.checkout.com/tag/payment-links/POST/payment-links.body.customer_retryPOST /payment-sessions(customer_retry): https://api-reference.checkout.com/tag/flow/POST/payment-sessions.body.customer_retryBreaking changes
None at runtime: the change is to PHPDoc types only. Arrays such as
['max_attempts' => n]assigned tocustomer_retrykeep working. Code that assigned aPaymentRetryRequestshould switch toCustomerRetry.README
Not affected: the README does not document these types.