fix(setups): align PaymentSetupsConfirmResponse with PaymentSetup schema#616
Merged
armando-rodriguez-cko merged 1 commit intoJul 16, 2026
Merged
Conversation
The confirm endpoint (POST /payments/setups/{id}/confirm/{payment_method_name})
returns the PaymentSetup schema, the same as the create/get responses. The
PaymentSetupsConfirmResponse class was instead modeled as a payment (postpayments)
response, referencing models such as Customer from payments.postpayments whose
shapes differ from the setups.entities models. This broke merchant onboarding,
since e.g. customer.email is a nested object in setups but a plain string in
postpayments.
Rewrite PaymentSetupsConfirmResponse to mirror PaymentSetupsResponse using the
setups.entities models, remove the orphaned PaymentSetupSource class, fix the
integration test, and add a serialization test covering the setups Customer shape.
robert-goheen-cko
approved these changes
Jul 16, 2026
armando-rodriguez-cko
deleted the
fix/payment-setups-confirm-response-models
branch
July 16, 2026 15:07
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.
Problem
A merchant reported that in
PaymentSetupsConfirmResponse, the referenced models (such asCustomer) came from thepayments.postpaymentspackage instead of thesetups.entitiespackage — as they should, and as they already are inPaymentSetupsResponse. Because the twoCustomershapes differ (e.g.customer.emailis a nested object{ address, verified }in setups but a plain string in postpayments), this broke merchant onboarding.Root cause
The confirm endpoint
POST /payments/setups/{id}/confirm/{payment_method_name}returns thePaymentSetupschema — identical to the create/get responses. ButPaymentSetupsConfirmResponsewas modeled as a payment (postpayments) response, with fields likeactionId,approved,status,processedOn,threeDSecure,risk,balances,subscription,processing,eci,schemeId,retry,sourcethat do not exist in thePaymentSetupschema.Changes
PaymentSetupsConfirmResponseto mirrorPaymentSetupsResponseusing thesetups.entitiesmodels. Covers all 19PaymentSetupproperties, verified against the current swagger spec.PaymentSetupSource— an orphaned class not present in thePaymentSetupschema, previously referenced only by the incorrectly-modeled confirm response.PaymentSetupsTestIT) which referenced the removedgetActionId()/getProcessedOn().PaymentSetupsConfirmResponseSerializationTestprovingcustomer.emaildeserializes as the nested setups object (would fail with the postpaymentsCustomer).Verification
./gradlew compileJava compileTestJava— passes.PaymentSetupsClientImplTest— pass.checkout_swagger_json, ingested today): confirm 200 →PaymentSetup, 19 properties, all mapped.