feat: add com.mercadopago.shopping.digital_delivery extension - #719
feat: add com.mercadopago.shopping.digital_delivery extension#719gforgab wants to merge 2 commits into
Conversation
|
Read it. The four points came through intact, and the two you flagged are the two Pointer-only: right call, and the failure mode is real. The State and Trust Contract section makes the correct argument. Worth adding the Two gaps in the schema undercut it as written.
One security note on Delivered versus settlement: the wording is right, and it stops one step short. The sentence saying a settlement rail must not wire delivered to release funds is Smaller wording point in the same section. The doc reads that Last one, on partial redemption. Requiring that the issuer model redemption as an Overall: the invariant is the right one, the prose defends it better than most, |
Addresses @westonale-facet's review on Universal-Commerce-Protocol#719 — make the schema enforce what the prose promises: - Make `lookup` required (a schema-valid artifact could otherwise carry no way to obtain the fresh issuer answer the MUSTs demand). - Add a typed `lookup_response` (status incl. partially_redeemed, required as_of freshness, kind-conditional remaining+currency / valid_until), following the catalog_lookup response house pattern; couple currency to remaining and constrain it with the ISO-4217 pattern. - State fail-closed when the issuer is unreachable (no cached fallback). - Require the issuer to authenticate the lookup caller; `reference` is not an authorization credential. - Express partial redemption at the interface (lookup_response) instead of requiring an append-only ledger on the unbindable issuer. - Phrase delivery as the presence of `delivered_at`, not a core Order state. - Name the settlement release trigger as out-of-band, with `lookup` making it checkable.
|
Thanks @westonale-facet — this is exactly the "make the schema enforce what the prose promises" pass the PR needed. Applied all of it:
The same hardening will carry to #635 once the |
Addresses @westonale-facet's review on Universal-Commerce-Protocol#719 — make the schema enforce what the prose promises: - Make `lookup` required (a schema-valid artifact could otherwise carry no way to obtain the fresh issuer answer the MUSTs demand). - Add a typed `lookup_response` (status incl. partially_redeemed, required as_of freshness, kind-conditional remaining+currency / valid_until), following the catalog_lookup response house pattern; couple currency to remaining and constrain it with the ISO-4217 pattern. - State fail-closed when the issuer is unreachable (no cached fallback). - Require the issuer to authenticate the lookup caller; `reference` is not an authorization credential. - Express partial redemption at the interface (lookup_response) instead of requiring an append-only ledger on the unbindable issuer. - Phrase delivery as the presence of `delivered_at`, not a core Order state. - Name the settlement release trigger as out-of-band, with `lookup` making it checkable.
a50183d to
c847b95
Compare
Addresses @westonale-facet's review on Universal-Commerce-Protocol#719 — make the schema enforce what the prose promises: - Make `lookup` required (a schema-valid artifact could otherwise carry no way to obtain the fresh issuer answer the MUSTs demand). - Add a typed `lookup_response` (status incl. partially_redeemed, required as_of freshness, kind-conditional remaining+currency / valid_until), following the catalog_lookup response house pattern; couple currency to remaining and constrain it with the ISO-4217 pattern. - State fail-closed when the issuer is unreachable (no cached fallback). - Require the issuer to authenticate the lookup caller; `reference` is not an authorization credential. - Express partial redemption at the interface (lookup_response) instead of requiring an append-only ledger on the unbindable issuer. - Phrase delivery as the presence of `delivered_at`, not a core Order state. - Name the settlement release trigger as out-of-band, with `lookup` making it checkable.
|
Thanks for working through all of it, and for typing the lookup answer rather than only making Nothing further from me on this one. Happy to look again if the shape changes after review. |
Vendor-namespaced Order extension for digital / intangible goods delivery (gift-card codes, vouchers, top-up PINs, license keys, access entitlements), prototyping the shape discussed in Universal-Commerce-Protocol#648. - Attaches to the durable Order (the artifact outlives the checkout session). - kind discriminator: redeemable_artifact (bearer, drawn down at the issuer) vs entitlement (granted, revocable right). - Stores only a durable reference + a lookup to query the issuer; no mutable state (balance/validity/redemption) is cached on the Order, so there is no stale copy to trust. Partial redemption lives at the issuer as an append-only ledger, obtained via lookup. - Delivery is not terminal and not settlement (a rail must not release funds on delivered). Core changes (reconciling the digital method_type contradiction and a non-postal destination) are out of scope here and tracked as separate EPs.
Addresses @westonale-facet's review on Universal-Commerce-Protocol#719 — make the schema enforce what the prose promises: - Make `lookup` required (a schema-valid artifact could otherwise carry no way to obtain the fresh issuer answer the MUSTs demand). - Add a typed `lookup_response` (status incl. partially_redeemed, required as_of freshness, kind-conditional remaining+currency / valid_until), following the catalog_lookup response house pattern; couple currency to remaining and constrain it with the ISO-4217 pattern. - State fail-closed when the issuer is unreachable (no cached fallback). - Require the issuer to authenticate the lookup caller; `reference` is not an authorization credential. - Express partial redemption at the interface (lookup_response) instead of requiring an append-only ledger on the unbindable issuer. - Phrase delivery as the presence of `delivered_at`, not a core Order state. - Name the settlement release trigger as out-of-band, with `lookup` making it checkable.
c847b95 to
2146b11
Compare
What
Adds
com.mercadopago.shopping.digital_delivery, a vendor-namespaced Orderextension for digital / intangible goods delivery — gift-card codes,
vouchers, top-up PINs, license keys, and access entitlements. Prototypes the
shape discussed in #648.
Why this shape
session (a code can be redeemed weeks later), so the record lives on the Order,
not the checkout.
kinddiscriminator —redeemable_artifact(bearer value drawn down at anissuer; "how much is left?") vs
entitlement(a granted, revocable right;"still valid, until when?").
reference+ alookupto query the issuer. No mutable state (balance, validity, redemptionstatus) is cached on the Order — there is no stale copy to trust. Partial
redemption lives at the issuer as an append-only ledger, obtained via
lookup.deliveredis not terminal; asettlement rail must not release funds on delivery.
render/trust rules as feat: add com.mercadopago.payment.render_artifact extension #635.
Scope
Vendor extension, no core change. Reconciling the
digitalmethod_typecontradiction (
expectation.json/fulfillment.md) and adding a non-postalexpectation.destinationare core and tracked as separate EnhancementProposals.
Changes
source/schemas/shopping/digital_delivery.json— extension schemadocs/specification/digital-delivery.md— spec (discovery, schema, state/trustcontract, lifecycle, scope)
mkdocs.yml— nav under Order Capability + llmstxt entry.cspell/custom-words.txt— domain termsRelated
contract.