Repository navigation
feat(setups): add setup payment type, drop rejected identification types - #226
Conversation
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 12 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. Adds PaymentSetupPaymentType with six lowercase values, removes rejected identification types (TAX_ID/OTHER), adds AccountFundingTransactionSender#reference, deprecates unsupported fields, and fixes the confirm integration test to assert correct response fields. All claims in the PR description are verified by the diff. 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: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 13 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 |
Adds PaymentSetupPaymentType with the six lowercase values, removes the identification types the API rejects with 422, fixes the confirm integration spec and deprecates card_present.
- AccountFundingTransactionSender: add reference, documented, with wire key, round trip and swagger example tests. - Confirm integration specs assert PaymentSetup fields instead of action_id, status and processed_on, which the confirm response lacks. - BacsPaymentMethod: drop the update note on initialization, it is not in the specification. - Revert the csv runtime dependency, it moves to its own change.
AccountFundingTransactionSender first_name, last_name, country_of_birth, nationality and address, and AccountFundingTransactionRecipient account_type are not part of the Payment Setups account funding transaction schema and the API ignores them. They are kept, marked @deprecated, and still serialize under their keys.
Descriptions, optionality, length limits and date format from the Payment Setups specification. No behaviour change.
c279580 to
d612c86
Compare
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 13 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 |
card_present is hidden from the public API reference but still supported by the API. CardPresentPaymentMethod is restored exactly as on master; the serialization test that it is sent under its key stays.
Restored on BacsPaymentMethod#initialization and added to CashAppPaymentMethod#initialization: on update the API replaces the payment methods, so enabled must be sent again. The specification does not state it; it is the API's behaviour.
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 13 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 |
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 13 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 |
|
This release adds card payouts to network tokens, unreferenced refunds and the missing card payout and bank payout request fields, the Payment Setup payment type, and the Dunning and Downtime payment retry types. It also makes the Issuing revoke and suspend request optional, aligns the PaymentType::MOTO value with the API, and deprecates the members the API no longer accepts on requests. Every deprecated member keeps working and will be removed in the next major version. **Added** Issuing (#225) * `IssuingClient#revoke_card` and `IssuingClient#suspend_card` can now be called without a request; the request argument is optional and an empty JSON object is sent when it is omitted. Payment Setups (#226) * `PaymentSetupPaymentType` with the lowercase values of the Payment Setups API: `REGULAR`, `RECURRING`, `MOTO`, `INSTALLMENT`, `PAY_LATER`, `UNSCHEDULED`. Use it for the `:payment_type` key of a Payment Setup create or update request. * `AccountFundingTransactionSender#reference`. Payouts and unreferenced refunds (#229) * `PaymentsClient#request_unreferenced_refund` and `UnreferencedRefundRequest`, sent to POST /payments with `payment_type` set to `UnreferencedRefund`. * `NetworkTokenDestination` and `DestinationType::NETWORK_TOKEN`, for card payouts and unreferenced refunds to a network token. * `PayoutRequest#segment`, `#items`, `#previous_payment_id` and `#processing`. * `CardPayoutProcessing` (`affiliate_id`, `affiliate_url`, `processing_speed`, `purchase_country`) and `CardPayoutItem` (`type`, `sub_type`). * `PaymentInstruction#remittance` and `InstructionRemittance` (`reference`), for bank payouts. * `CheckoutSdk::Common::ResidentialStatusType` (`RESIDENT`, `NON_RESIDENT`) for `AccountHolder#residential_status`. The field is optional and only used by bank payouts. Payments (#229) * `PaymentType::PAY_LATER` (`PayLater`). Payment retries, hosted payments, payment links and payment sessions (#228) * `PaymentRetryRequest#dunning` and `#downtime`, with the new `DunningRetryRequest` (`enabled`, `max_attempts`, `end_after_days`) and `DowntimeRetryRequest` (`enabled`). * `CheckoutSdk::Common::CustomerRetry` (`max_attempts`). * `PaymentSessionsRequest#customer_retry` and `#instruction`. * `PaymentLink#instruction` and `#payment_method_configuration`. **Changed** * `CustomerRetry` moves from `CheckoutSdk::Accounts` to `CheckoutSdk::Common`; `CheckoutSdk::Accounts::CustomerRetry` remains as an alias of the same class (#228). * `PaymentSessionsRequest#payment_type` is documented as a `PaymentType` string; it was documented as a boolean (#228). * `PayoutSource#amount` is documented as an Integer; it was documented as a String (#229). * Request fields of payouts, unreferenced refunds, Payment Setups, hosted payments, payment links and payment sessions now document whether they are required or optional per request, with the limits and enum values of the API reference (#226, #228, #229). **Fixed** * `PaymentSegment` is now loaded by the gem, so `PayoutRequest#segment`, `UnreferencedRefundRequest#segment` and `PaymentRequest#segment` can take a `PaymentSegment` object (#229). * `PaymentRetryRequest` is now loaded by the gem; it could not be referenced before (#228). **Deprecated** All deprecated members keep working and will be removed in the next major version. * `CheckoutSdk::Issuing::CardUpdateHeaders` and the `headers` argument of `IssuingClient#update_card`: the API no longer documents these headers; call `update_card(card_id, update_card_request)`. Headers that are set are still sent unchanged (#225). * `AccountFundingTransactionSender#first_name`, `#last_name`, `#country_of_birth`, `#nationality` and `#address`: not part of the Payment Setups sender; no replacement (#226). * `AccountFundingTransactionRecipient#account_type`: not part of the Payment Setups recipient; no replacement (#226). * `AccountHolder#full_name`: not in any account holder request; no replacement (#229). * `AccountHolder#gender`: not in any account holder request; no replacement (#229). * `BankAccountDestination#bank`: not in the bank payout destination; no replacement (#229). * `PaymentInstruction#charge_bearer`, `#repair` and `#quote_id`: not in the payout instruction request, still returned when retrieving a payout; no replacement (#229). * `PaymentInstruction#skip_expiry` and `#mvv`: not in the API; no replacement (#229). * `InstructionScheme::SWIFT`: the bank payout request only accepts `local` and `instant`; no replacement (#229). * `PayoutSource#amount`: not in any payout or unreferenced refund source request; no replacement (#229). * `PaymentSessionsRequest#retry`: not part of the payment sessions request and ignored by the API; no replacement (#228). * `HostedPaymentsSession#payment_ip`, `PaymentLink#payment_ip` and `PaymentSessionsRequest#ip_address`: deprecated by the API; no replacement (#228). * `CheckoutSdk::Accounts::CustomerRetry`: use `CheckoutSdk::Common::CustomerRetry` (#228). **Breaking changes required by the API**⚠️ * `AccountFundingTransactionIdentificationType::TAX_ID` and `::OTHER` are removed, because the API rejects them with a 422. Use `DRIVING_LICENSE`, `PASSPORT` or `NATIONAL_ID` (#226). **Breaking changes (SDK alignment)**⚠️ * `PaymentType::MOTO` sends `MOTO` instead of `Moto`. Code that uses the constant needs no change; code that compares responses or stored values with the literal `Moto` should compare with `MOTO` (#229). * `PaymentRetryRequest#max_attempts` and `#end_after_day` are removed. The class could not be loaded before this release, so no working code is affected. Use `dunning.max_attempts` and `dunning.end_after_days` (#228).



Summary
Payment Setup in Ruby gets
PaymentSetupPaymentTypewith the six lowercase values of the specification, documented on create and update. The account funding identification type losesTAX_IDandOTHER, which the API rejects with 422, and the account funding sender gets thereferencefield of the specification. The confirm integration spec no longer skips every time and asserts the fields of the Payment Setup it returns, and the six account funding sender and recipient fields the spec does not have are deprecated.Changes
lib/checkout_sdk/payments/setups/payment_setup_payment_type.rb(new):PaymentSetupPaymentTypewithREGULAR,RECURRING,MOTO,INSTALLMENT,PAY_LATER,UNSCHEDULED("regular"..."unscheduled").lib/checkout_sdk/payments/payments.rb: requires the new file.lib/checkout_sdk/payments/setups/payment_setups_client.rb::payment_typedocumented oncreate_payment_setupandupdate_payment_setup.PaymentTypeis unchanged.lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb:TAX_IDandOTHERremoved; docs on the remaining values.lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb: one doc entry per attribute against the spec.lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb: newreferenceattribute (the unique reference for the sender of the payment), sent asaccount_funding_transaction.sender.reference;first_name,last_name,country_of_birth,nationalityandaddressmarked@deprecated; one doc entry per attribute against the spec (description, optionality,date_of_birthformat date).lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb:account_typemarked@deprecated; one doc entry per attribute against the spec (description, optionality,first_nameandlast_namemax 50,account_numbermax 34,date_of_birthformat date, address keys and their limits).lib/checkout_sdk/payments/setups/bacs_payment_method.rb: one doc block per attribute against the spec, including its constants module and default.lib/checkout_sdk/payments/setups/bacs_payment_method.rb,lib/checkout_sdk/payments/setups/cash_app_payment_method.rb: theinitializationdoc says an update replaces the payment methods, soenabledmust be sent again to keep a method enabled. The inlineEnum:lines onstatusandinitialization, already typed by their constants modules, are dropped, and both write the default asDefault: disabled.spec/checkout_sdk/payments/setups/payment_setup_payment_type_serialization_spec.rb(new): the six payment type values on the wire and through create and update, the identification values and fields, the senderreference(wire key, round trip, swagger example), the deprecated sender and recipient fields, which still serialize under their keys, and a round trip plus the swagger example for every sender and recipient attribute.spec/checkout_sdk/payments/setups/setup_payment_methods_serialization_spec.rb: Bacs initialization serialization, a Bacs round trip through the response parsing and the swagger example values (instrument_id,account_holder.email), and Card Present sent under its literal key.spec/checkout_sdk/payments/setups/payment_setups_helper.rb:payment_typeusesPaymentSetupPaymentType::REGULAR; helpers that pick a ready method fromavailable_payment_methodsor expectpayment_method_not_ready.spec/checkout_sdk/payments/setups/payment_setups_integration_spec.rb: confirm readsavailable_payment_methods, confirms a ready method or expectspayment_method_not_ready, and assertsid,amount,currency,referenceandpayment_methods, the Payment Setup fields the confirm call returns, instead ofaction_id,status,processed_onand_links, which that response does not have.API Reference
POST /payments/setups:payment_type,payment_methods,account_funding_transactionPUT /payments/setups/{id}GET /payments/setups/{id}POST /payments/setups/{id}/confirm/{payment_method_name}Payment type
PaymentSetupPaymentTypeis additive:PaymentTypekeeps its values.Regular,RecurringandMotowere checked: the API accepts them and stores them in lowercase. The new type is the only way to sendpay_later, whichPaymentTypedoes not have.Deprecated
AccountFundingTransactionSender#first_name,#last_name,#country_of_birth,#nationalityand#address. Not part of the Sender schema of the Payment Setups account funding transaction; the API ignores them on requests. There is no replacement. Will be removed in the next major version.AccountFundingTransactionRecipient#account_type. Not part of the Recipient schema of the Payment Setups account funding transaction; the API ignores it on requests. There is no replacement. Will be removed in the next major version.Breaking changes required by the API
AccountFundingTransactionIdentificationType::TAX_IDand::OTHERare removed: the API rejects both values with 422account_funding_transaction.sender.identification.type_property_invalid.Migration: use
PASSPORT,DRIVING_LICENSEorNATIONAL_ID; code that referencesTAX_IDorOTHERraises NameError.Follow-ups
csvas a runtime dependency (needed from Ruby 3.4, where it is no longer a default gem) is a separate change.README
No change needed.