Skip to content

refactor: compose Order payment instruments from the shared base - #638

Open
raginpirate wants to merge 1 commit into
order-payment-instrumentsfrom
raginpirate/order-payment-instruments
Open

refactor: compose Order payment instruments from the shared base#638
raginpirate wants to merge 1 commit into
order-payment-instrumentsfrom
raginpirate/order-payment-instruments

Conversation

@raginpirate

Copy link
Copy Markdown
Member

Stacked ontop of #584 as an alternative direction to extend payment instruments beyond checkout.

The main differences are:

  • order.payment.instruments reuses the shared payment_instrument base instead of introducing a parallel order_payment_instrument.
  • handler_id moves into selected_payment_instrument, since handler routing is specific to Checkout processing. Handler defined instrument schemas still extend the same base once.
  • credential remains on the base because payment handlers extend it with their concrete credential shape. Sensitive and reusable credential fields must use ucp_response: omit, allowing responses to retain safe metadata such as credential type without returning tokens. It is also nil-able so it is not a requirement for request either.
  • Per-instrument amount remains owned by the Split Payments extension. Split Payments now composes onto both Checkout and Order. For a completed split, Order preserves the Checkout instrument IDs and gross contribution amounts; refunds and credits remain separate Order adjustments.
  • Order requires display, while leaving its handler-defined shape open.

…the selected instrument def. Order simply leverages the default extended payment instrument, maintaining the schema extension pattern handlers use today. Fix some language around split payments extending order and how sensitive credential values are meant to be omitted in responses.
@raginpirate
raginpirate requested a review from richmolj July 26, 2026 19:58
@raginpirate raginpirate self-assigned this Jul 26, 2026
@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 26, 2026

@igrigorik igrigorik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@damaz91 damaz91 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants