Replies: 5 comments
|
Your read-model distinction is the part worth pulling on. The two things I'd build in from day one on the vendor-namespaced extension, since retrofitting either is painful: a persistent read path independent of order or action status, so an order can complete and archive while the code itself stays queryable, and an explicit redeemed state transition rather than treating delivery as terminal. A gift-card code that's bearer-redeemable with no notion of already spent is a double-spend bug waiting to be found, and it's a much smaller problem to model at the schema level now than to patch onto a shipped extension later. The prototype-first path seems right: land the delivered-artifact shape as a vendor extension, prove the redemption lifecycle against a real implementation, and bring destination/vocabulary as focused EPs once there's something running to point at rather than a hypothetical. |
|
Thanks @westonale-facet — sharpest framing so far, agreed on the core. Primitive: neither fits. Lifecycle: taking your correction — delivery is not terminal. Scope — "digital goods" isn't one shape. This nails bearer artifacts (gift cards, vouchers, top-ups, keys). But entitlement/access — a course, platform/SaaS access — has no bearer code and no "redeem": access is provisioned to the buyer, and the question is "still valid, until when?" ( Path: prototype-first. v1 lands the redeemable-artifact shape (redemption lifecycle + order-independent read path) as a vendor extension in the #635 mold; |
|
Both corrections land, and the second is the more important one: I collapsed two shapes into one and you have separated them correctly. Bearer artifacts and entitlements are not variants of a single "digital good" type, and a spec that models them as one will be wrong for whichever one it did not have in mind. The line I would draw is not bearer versus not. It is what question the buyer's agent has to be able to ask six months later. For a bearer artifact: how much is left? State is a quantity that decrements, and anyone holding the code can decrement it. For an entitlement: is this still good, and until when? State is a validity window that can be revoked for reasons the order knows nothing about, a chargeback, a ToS termination, the issuer sunsetting the product. That difference drives the one thing I would most want the spec to get right, and it follows directly from your point that the issuer is the source of truth: do not carry the mutable state in the protocol payload. If UCP puts On lifecycle, one thing worth taking from the money leg, because it is structurally the same problem: separate who authorizes a state transition from when it is submitted. On escrow we let the buyer pre-authorize the redeem and let it be submitted later, immediate or deferred, because "the buyer agreed to this" and "the release happened" are genuinely different events with different timing. Your And if redemption is partial, it is not a transition at all. It is an append-only sequence of draws against the artifact. Modelling that as a status enum loses exactly the history a dispute needs, which was the original objection to The reason I care where this lands: if delivery is not terminal, then delivery finality and settlement finality are different events. A rail that releases funds on To be clear about what I am speaking from: we run the escrow and redeem lifecycle in production for physical fulfilment, not a bearer-artifact implementation. Take the second half as an argument from the adjacent problem rather than from a running one. |
|
This is really helpful — the "what question the buyer's agent has to be able to ask six months later" framing is the right axis, and it changes what I'd put in the schema. Taking your points as design principles for the prototype: 1. The order stores a pointer, never the state. This is the one I'd fix as an invariant. The artifact carries a durable 2. Partial redemption is an append-only ledger, not a status enum. Agreed — a sequence of draws against the artifact, so the dispute history is the data model rather than something a terminal flag discards. A boolean 3. 4. Delivery finality ≠ settlement finality. This is the one I most want the spec to say out loud. If delivery isn't terminal, a rail that releases funds on On weighting, to be fair to your own caveat: I'll take the ledger and the delivery-vs-settlement points as strong priors from the adjacent escrow/redeem problem you run in production, and treat the bearer-artifact specifics as what the prototype actually has to prove — I'd rather validate the redemption lifecycle against a real bearer implementation than assert it. The pointer-not-balance rule (1) I'm comfortable fixing now regardless. Prototype-first still the plan: a vendor-namespaced delivered-artifact extension in the #635 mold — |
|
Drafted the prototype as promised: #719 — a vendor-namespaced It carries what we converged on here:
Destination/vocabulary and the @westonale-facet — would value your read, especially on the pointer-only decision and the delivered-vs-settlement wording. Tagging you as promised. |
Uh oh!
There was an error while loading. Please reload this page.
Temperature-check before any schema. The spec points two ways on digital goods, and a common flow falls through the gap.
The contradiction:
expectation.jsonlistsdigitalas a well-knownmethod_type(and has since day one), butfulfillment.mdsays "digital goods do not need to be assigned to a method." Sodigitalis a named delivery method with nowhere to live — and even where it's named,expectation.destinationis fixed topostal_address, which can't hold a digital target.Where it bites (ordinary, high-frequency commerce — top-ups, gift cards, codes; maps cleanly to agent flows):
Questions:
digitalvalue and the doc language should be reconciled.actionsprimitive (feat: extension-defined Actions primitive #582; feat: add com.mercadopago.payment.render_artifact extension #635 uses it for a Pix display, [Proposal]: Out-of-session payment settlement — order-level actions + order.payment_status #641 would putactionson the Order), orfulfillment_event? Noteactionsis framed as outstanding (to-do), while a code must persist for later retrieval — and unlike a Pix artifact, a gift-card code is bearer-redeemable, so it needs a tighter read model.If there's appetite, happy to prototype the no-core-change piece first (a vendor-namespaced delivered-artifact extension, in the #635 mold) and bring the destination/vocabulary parts as focused EPs after.
All reactions