ucp-orders-webhooks
Implement UCP Order capability and webhook delivery — post-purchase order management with fulfillment tracking, adjustments (refunds/returns), and cryptographically signed webhook notifications. Use when building order management or webhook infrastructure.
Best use case
ucp-orders-webhooks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement UCP Order capability and webhook delivery — post-purchase order management with fulfillment tracking, adjustments (refunds/returns), and cryptographically signed webhook notifications. Use when building order management or webhook infrastructure.
Teams using ucp-orders-webhooks should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ucp-orders-webhooks/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ucp-orders-webhooks Compares
| Feature / Agent | ucp-orders-webhooks | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Implement UCP Order capability and webhook delivery — post-purchase order management with fulfillment tracking, adjustments (refunds/returns), and cryptographically signed webhook notifications. Use when building order management or webhook infrastructure.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# UCP Orders & Webhooks ## Before writing code **Fetch live spec**: Web-search `site:ucp.dev specification order` and fetch the page for the exact order data model, webhook envelope, and signature format. Also fetch https://ucp.dev/specification/reference/ for adjustment types, fulfillment event types, and line item status derivation rules. ## Conceptual Architecture ### Order Capability (`dev.ucp.shopping.order`) Orders represent the post-purchase lifecycle. An order is created when a checkout completes successfully. The order contains: - **Line items** with quantity tracking (total, fulfilled) - **Fulfillment expectations** (estimated delivery) and **fulfillment events** (shipped, delivered, etc.) - **Adjustments** (refunds, returns, credits, disputes, cancellations) - **Totals** (subtotal, tax, discount, fulfillment, fee, total) ### Line Item Status Derivation Status is derived from quantities, not stored: - `fulfilled == total` → `"fulfilled"` - `fulfilled > 0` → `"partial"` - `fulfilled == 0` → `"processing"` ### Fulfillment Event Types (open string enum) Common values: `processing`, `shipped`, `in_transit`, `delivered`, `failed_attempt`, `canceled`, `undeliverable`, `returned_to_sender`. The set is extensible — new values may appear. ### Adjustment Types (open string enum) Common values: `refund`, `return`, `credit`, `price_adjustment`, `dispute`, `cancellation`. Also extensible. ### Webhook Delivery - Business POSTs the **full order entity** (not incremental deltas) to the Platform's webhook URL. - Each delivery includes an `event_id` (unique) and `created_time` (RFC 3339). - Platform MUST respond with 2xx immediately and process asynchronously. - Business should implement retry with exponential backoff on non-2xx responses. ### Webhook Signature (Detached JWT) This is critical for security: 1. **Signing (Business side):** - Select an EC P-256 key from `signing_keys` in the Business's `/.well-known/ucp` profile - Create a Detached JWT (RFC 7797) over the request body - Set `kid` in the JWT header to match the key ID - Include the signature in the `Request-Signature` HTTP header 2. **Verification (Platform side):** - Extract `Request-Signature` header - Parse JWT header for `kid` - Fetch Business's `/.well-known/ucp` profile, find the matching key - Verify the JWT signature against the request body - Reject if verification fails ### Implementation Guidance **Business:** - Generate EC P-256 key pair; publish public key in discovery profile - After checkout completion, create order entity - On every fulfillment event or adjustment, POST the full updated order to the platform webhook URL with a fresh signature - Implement retry logic (exponential backoff, max attempts) **Platform:** - Expose a webhook endpoint URL (declared in order capability config) - Verify `Request-Signature` on every incoming webhook - Process order updates asynchronously (respond 2xx first) - Handle idempotency using `event_id` Fetch the conformance test suite at https://github.com/Universal-Commerce-Protocol/conformance for webhook test cases.
Related Skills
spree-events-webhooks
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
shopify-webhooks
Implement Shopify webhooks — subscription methods (HTTP, EventBridge, Pub/Sub, SQS), HMAC verification, mandatory GDPR webhooks, delivery methods, retry policy, and idempotency. Use when building event-driven Shopify integrations.
sf-orders
Manage Salesforce Commerce orders — B2C (SCAPI order objects, status lifecycle, order confirmation, returns) and B2B (Order object, OrderItem, splits, approval workflows, fulfillment). Use when implementing order management across either platform.
saleor-webhooks
Configure Saleor webhooks — async and sync events, subscription payloads, JWS/HMAC signature verification, retry policy, and event types. Use when building webhook-driven integrations.
saleor-orders
Manage the Saleor order lifecycle — order creation, fulfillments, returns, refunds, draft orders, and order events. Use when working with Saleor orders.
medusa-orders
Manage Medusa v2 orders — order lifecycle and state machine, fulfillment workflows, returns, exchanges, claims, draft orders, and order editing. Use when working with order processing.
bc-webhooks
Implement BigCommerce webhooks — event topics, webhook management, payload handling, verification, retry logic, and event-driven architecture. Use when building real-time integrations that react to store events.
bc-orders
Work with BigCommerce orders — order lifecycle, statuses, line items, shipments, refunds, order metafields, and fulfillment. Use when building order management integrations or processing orders programmatically.
acp-orders-webhooks
Implement ACP order lifecycle management and webhook event delivery. Use when building order creation, status tracking, fulfillment updates, post-purchase adjustments, and HMAC-signed webhook emission.
woo-testing
Test WooCommerce extensions — PHPUnit unit/integration tests, WP test suite, WooCommerce test helpers, E2E with Playwright, and WP-CLI test scaffolding. Use when writing tests for WooCommerce plugins or setting up a test environment.
woo-shipping
Build WooCommerce shipping methods — WC_Shipping_Method, shipping zones, shipping classes, rate calculation, tracking, and integration with carriers. Use when creating custom shipping integrations or configuring shipping logic.
woo-setup
Install WooCommerce, configure the development stack, and set up a local dev environment with WP-CLI, Docker, or wp-env. Use when setting up a new WooCommerce project or development environment.