feat: add Return Extension to UCP specification#257
Open
venkatesh-ucp wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
Open
feat: add Return Extension to UCP specification#257venkatesh-ucp wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
venkatesh-ucp wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
Conversation
This change introduces the Return Extension, allowing businesses to communicate return conditions, methods, timelines, and costs. Key changes: - Added JSON schemas for Return Policy, Method, and Fee. - Extended Checkout and Order with return policies. - Renamed Return Policy 'category' to 'return_window_type'. - Added specification documentation and updated site navigation. Closes #TBD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This proposal introduces a Return Extension to the UCP Checkout capability. It allows businesses to communicate the conditions, methods, timelines, and costs associated with returning physical items directly to the platform and the buyer, mirroring real-world commerce requirements.
Motivation
Currently, the UCP Fulfillment Extension only handles how physical goods get to a buyer (shipping, pickup, and associated options). However, returning items is a core primitive of physical commerce.
By exposing the return policy natively in the UCP schema, AI agents and platforms can intelligently answer user queries like "Can I return this in-store?" or "How many days do I have to return this?" without forcing the user to leave the platform to hunt for a policy on the merchant's website.
Use Cases
This schema addition is designed to support the following agentic and platform use cases:
Detailed Design
Architectural Discussion: Fulfillment Extension vs. Standalone Extension
One of the main questions to answer before adding return policy support is around whether to embed
return_policieswithin the existing Fulfillment Extension. Specifically, the question is whether returns are a subset of physical fulfillment, or if they represent a broader conceptual primitive (a "policy") that applies to line items independent of logistics.Pros of Adding to the Fulfillment Extension
line_item_ids. Reusing this extension avoids duplicating the boilerplate required to map rules to specific items.Cons of Adding to the Fulfillment Extension (The Case for a Standalone Extension - Preferred approach)
return_policyis tightly coupled to the Fulfillment Extension, it becomes much harder to reuse the returns spec in other contexts. For example, a post-purchaseOrdercapability or a simple product discovery agent might need to display return policies without carrying the irrelevant baggage of forward-fulfillment routing and shipping rate calculations.Proposed Entities
Return Policy Response
idline_item_idsreturn_window_typeEnum:
• lifetime: Returns are accepted at any time, with no expiration.
• no_returns: Refunds are not allowed, but exchanges or store credit might be permitted depending on the `exchanges_allowed` flag.
• final_sale: Strictly no refunds and no exchanges under any circumstances.
• finite_window: Returns are only accepted within a set number of days.
return_dayscategoryisfinite_window.exchanges_allowedfalseunless specified otherwise by the merchant.methodsReturn Method Object
typeEnum:
• in_store: The buyer returns the item physically at a retail store location.
• by_mail: The buyer packages and ships the item back to the merchant via a carrier.
• kiosk: The buyer drops the item off at a designated self-service kiosk or drop-off point.
feeReturn Fee Object
typeEnum:
• free: The merchant covers return costs (e.g., provides a prepaid shipping label or processes in-store drop-offs for free).
• fixed_fee: The merchant charges a flat fee (e.g., a restocking fee or a deducted return shipping fee).
• customer_responsibility: The buyer is entirely responsible for organizing, paying for, and delivering the item back to the business (e.g., paying for their own postage).
amounttypeisfixed_fee.display_textExample Payload
{ "return_policies": [ { "id": "rp_apparel", "line_item_ids": [ "shirt", "pants" ], "category": "finite_window", "return_days": 30, "exchanges_allowed": true, "methods": [ { "type": "in_store", "fee": { "type": "free", "display_text": "Free In-Store Return" } }, { "type": "by_mail", "fee": { "type": "fixed_fee", "amount": 500, "display_text": "Return Shipping Fee" } } ] }, { "id": "rp_final_sale", "line_item_ids": [ "custom_engraved_watch" ], "category": "final_sale", "exchanges_allowed": false } ] }Checklist