Repository navigation
fix(payments): load retry types and add customer_retry to sessions - #228
armando-rodriguez-cko wants to merge 4 commits into
Conversation
PaymentRetryRequest was never required by the gem, misspelled end_after_days and had no dunning or downtime. DunningRetryRequest and DowntimeRetryRequest are added, CustomerRetry moves to Common (the Accounts constant remains as a deprecated alias), and payment sessions gain customer_retry while the off-spec retry attribute is deprecated.
🔴 Risk Classification: MAJORApproval route: AI Review + Human Approval Required Classification reasons
Operational gates
Files analysed: 11 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. This PR fixes a real NameError (PaymentRetryRequest never required), corrects the misspelled 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 |
PaymentRetryRequest was never required on master, so its top-level max_attempts and end_after_day could not be used. Remove them. Document the payment sessions retry attribute as ignored by the API, fix the payment_type doc type and enum, and flag tax_amount as not in the specification. Add instruction to payment links and payment sessions and payment_method_configuration to payment links. Complete payment link and hosted payment docs with spec ranges and defaults.
The API reference marks payment_ip on hosted payments and payment links, and ip_address on payment sessions, as deprecated. Tag them in the YARD docs and assert the exact payment_method_configuration serialization with a nested card property.
🔴 Risk Classification: MAJORApproval route: AI Review + Human Approval Required Classification reasons
Operational gates
Files analysed: 11 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
Loads the payment retry types and aligns the payment retry, hosted payments, payment links and payment sessions requests with the API reference, including Dunning and Downtime retries and customer retries on payment sessions.
Changes
lib/checkout_sdk/payments/payments.rb: requiresdunning_retry_request,downtime_retry_requestandpayment_retry_request(the retry class was never loaded before).lib/checkout_sdk/payments/payment_retry_request.rb:PaymentRetryRequestnow hasenabled,dunninganddowntime.lib/checkout_sdk/payments/dunning_retry_request.rb: newDunningRetryRequest(enabled,max_attempts,end_after_days).lib/checkout_sdk/payments/downtime_retry_request.rb: newDowntimeRetryRequest(enabled).lib/checkout_sdk/common/customer_retry.rb:CustomerRetrymoves toCheckoutSdk::Common::CustomerRetry;CheckoutSdk::Accounts::CustomerRetrystays as a deprecated alias.lib/checkout_sdk/payments/sessions/payment_sessions_request.rb: addscustomer_retryandinstruction; deprecatesretryandip_address;payment_typedocumented as aPaymentTypestring.lib/checkout_sdk/payments/links/payment_link.rb: addsinstructionandpayment_method_configuration; deprecatespayment_ip.lib/checkout_sdk/payments/hosted/hosted_payments_session.rb:customer_retrydocumented asCheckoutSdk::Common::CustomerRetry; deprecatespayment_ip.lib/checkout_sdk/payments/payment_request.rb:retrydocumented.HostedPaymentsSession,PaymentLinkandPaymentSessionsRequest, with ranges and defaults from the API reference.spec/checkout_sdk/payments/retry_request_serialization_spec.rb:PaymentRetryRequest,DunningRetryRequest,DowntimeRetryRequest,CustomerRetry(all properties, swagger example, false and zero values, alias identity, use from the three endpoints), plusinstructionandpayment_method_configuration.spec/checkout_sdk/payments/hosted/hosted_payments_integration_spec.rb: usesCheckoutSdk::Common::CustomerRetry.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
max_attemptsandend_after_dayaccessors are removed fromPaymentRetryRequest. The class could never be loaded before this change, so no working code is affected. Usedunning.max_attemptsanddunning.end_after_days.PaymentSessionsRequest#retry(not part of the payment sessions request; the API ignores it),PaymentSessionsRequest#ip_address,HostedPaymentsSession#payment_ip,PaymentLink#payment_ipand theCheckoutSdk::Accounts::CustomerRetryalias.README
Not affected: the README does not document retries or these request fields.