Repository navigation
feat(setups): add klarna and stcpay actions, tamara fields, payment type - #258
rodrigojara-cko wants to merge 7 commits into
Conversation
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 3 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 Klarna iban and action, stc pay action and the Tamara fields; payment_type gets its own enum with the six lowercase spec values; local_date_time and last_payment_amount follow the spec types. Members the spec does not have are deprecated.
338c986 to
8470818
Compare
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 3 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 Klarna/stcpay actions and iban, Tamara initialization and risk_assessment, a new PaymentSetupPaymentType enum, and corrects field types (last_payment_amount to float, local_date_time to datetime); deprecated fields are preserved with comments and tested. The diff matches the stated intent, the integration test comparison is correctly simplified from a string-lower workaround to direct enum equality, and no error paths or migrations are obviously missing. 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 |
There was a problem hiding this comment.
✅ Auto-approved — this PR meets all Low-risk criteria.
All checks passed, no unresolved comments, and the change classification is:
no_low_class_matchedprod_source_modified2.2.6_logical_extension:The PR adds new enum values, new fields, and new nested classes purely as natural extensions of existing payment setup abstractions without introducing new endpoints, external integrations, persisted data classes, auth changes, or background workers.
wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…
The specification types last_payment_amount as a number (example 55.99), but the sandbox stores and returns 55 for 55.99. The doc says so, so the type is not changed back and forth; the specification is reported separately.
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 3 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: 3 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: 3 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: 3 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
Payment Setup in Python gains Klarna
ibanandaction, stc payaction, and Tamarainitializationandrisk_assessment.payment_typegets its own enum with the six lowercase spec values (PaymentType.PAYLATERsendsPayLater, which the API rejects with 422),local_date_timeis typed as a date-time andlast_payment_amountas a number. Members the spec does not have are marked deprecated. Every payment method keeps the base class it had before, andPaymentTypecan still be imported from the setups module.Changes
checkout_sdk/payments/setups/setups.py:PaymentSetupPaymentType(REGULAR,RECURRING,MOTO,INSTALLMENT,PAY_LATER,UNSCHEDULED) onPaymentSetupsRequest.payment_type; the paymentsPaymentTypeis unchanged.PaymentTypeis still imported in the setups module (marked# noqa: F401with a deprecation comment pointing toPaymentSetupPaymentType), sofrom checkout_sdk.payments.setups.setups import PaymentTypekeeps working.Klarna.iban,Klarna.action(KlarnaAction,KlarnaActionType),Stcpay.action(StcpayAction,StcpayActionType).Tamarakeeps its base classPaymentSetupPaymentMethodand declaresinitializationitself (defaultdisabled), plusrisk_assessment(TamaraRiskAssessment).BizumandBlikkeep their base classPaymentMethodBase. Each one redeclaresinitializationwith the same type and default and a deprecation comment, so callers and the request body do not change.PaymentSetupTerminal.local_date_timeisdatetime(a string is still sent unchanged);MerchantAccount.last_payment_amountisfloat.initializationdoc (PaymentMethodBaseandTamara) says that an update replaces the payment methods, soenabledmust be sent again to keep a method enabled; the specification does not state this, it is the API's behaviour.Ideal.description,Knet.languageandBancontact.account_holder_namesay that the specification marks them optional, but the API keeps the method invalid until they are sent.tests/payments/setups/payment_setups_serialization_test.py: literal wire keys, round trips through the response wrapper and the spec examples for every new field, everyPaymentSetupPaymentTypevalue,local_date_timeas datetime and string,last_payment_amount55.99, deprecated members still sent, the base classes ofBizum,BlikandTamara, thePaymentTypeimport from the setups module, and the deprecatedPaymentMethodAction.client_tokenandsession_idstill sent and read under their keys.tests/payments/setups/payment_setups_integration_test.py: usesPaymentSetupPaymentType.API Reference
POST /payments/setups:payment_type,payment_methodsPUT /payments/setups/{id}GET /payments/setups/{id}POST /payments/setups/{id}/confirm/{payment_method_name}Deprecated
All of them will be removed in the next major version.
initializationonBizumandBlik. Their spec schemas have noinitializationand the API ignores it. No replacement.payment_method_optionsonKlarna,Stcpay,TabbyandBizum, and thePaymentMethodOptionsandPaymentMethodOptionclasses. Useactionon Klarna and stc pay; no replacement on Tabby and Bizum.PaymentSetupInstrument.phone,account_holderandallow_update. Removed from the Payment Setups specification; the API accepts and ignores them. No replacement.PaymentMethodAction.client_tokenandsession_id. Not part of the PayPal or instrument action schemas, the two that use this class; the API ignores them. No replacement.PaymentTypeimported fromcheckout_sdk.payments.setups.setups. UsePaymentSetupPaymentTypefor Payment Setups;PaymentTypestays incheckout_sdk.payments.paymentsfor/payments.Breaking changes
None. No class changes its base class and no import is removed. Annotations change (
payment_type,local_date_time,last_payment_amount), but Python does not enforce them and existing values are still sent as before. Forpayment_type, aPaymentTypevalue keeps being sent as is:Regularis accepted, whilePayLaterkeeps getting the 422 from the API, so code that setsPaymentType.PAYLATERshould switch toPaymentSetupPaymentType.PAY_LATER. Responses readpayment_typeas the lowercase string, which compares equal to thePaymentSetupPaymentTypevalue.Follow-ups
Reported internally:
/paymentstypes until the next major version.Tamaranow sendsinitialization: disabledby default, the same as the other methods onPaymentMethodBase.README
No change needed.