Skip to content

BTI-16: add Split Payments (Marketplaces) solution#17

Merged
vildanbina merged 1 commit into
developfrom
BTI-16-split-payments
Jul 15, 2026
Merged

BTI-16: add Split Payments (Marketplaces) solution#17
vildanbina merged 1 commit into
developfrom
BTI-16-split-payments

Conversation

@vildanbina

@vildanbina vildanbina commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Adds the Split Payments (Marketplaces) service to the SDK, following the pattern used by the official PHP and Node SDKs.

What changed

  • Add the Marketplaces solution covering all six request types: split, transfer (I/II), refund_supplementary (I/II), and manual_transfer.
  • Follow the PHP/Node combine() pattern — split/refund_supplementary build a supplementary service that is combined into a payment/refund (payments.create_payment("ideal", {...}).combine(mp).pay()/.refund()); transfer/manual_transfer post standalone DataRequests.
  • Add combine() + CombinableService to the builder base. The empty default keeps every existing builder's output byte-identical (no behavior change for other payment methods).
  • Map grouped Marketplace/Seller split params from a single spec dict, with a unique GroupID per seller.
  • Add unit + feature tests asserting the exact serialized request body per request type, plus examples/marketplaces.py and a README section.

Verification

  • Full suite: 2243 passing, ruff clean, 100% coverage on the new builder.
  • Split is confirmed against the live sandbox — the gateway accepts the combined Marketplaces/Split shape (rejects only placeholder account IDs).
  • transfer / refund_supplementary / manual_transfer are covered by mocked tests only. They still need real Split Payments account data (valid seller GUIDs + a live split transaction key) to verify end-to-end against the gateway. Their /json/DataRequest endpoint matches the PHP/Node SDKs but is not yet live-proven.

- add MarketplacesBuilder with split, transfer, refund_supplementary and manual_transfer
- register "marketplaces" solution in SolutionMethodFactory
- add combine() to BaseBuilder so a supplementary service rides in one ServiceList
- add CombinableService model returned by split/refund_supplementary
- split and refund_supplementary combine into a payment/refund; transfer and manual_transfer post standalone DataRequests
- map grouped Marketplace/Seller split params from a single spec dict
- add unit and feature tests asserting the exact wire body per request type
- add examples/marketplaces.py demoing all six request types
- document Split Payments usage in README
@vildanbina vildanbina force-pushed the BTI-16-split-payments branch from cb50179 to 0ed5bd4 Compare July 15, 2026 11:03
@vildanbina vildanbina merged commit 0605180 into develop Jul 15, 2026
6 checks passed
@vildanbina vildanbina deleted the BTI-16-split-payments branch July 15, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants