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.

17 stars

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

$curl -o ~/.claude/skills/ucp-orders-webhooks/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/ucp-agentic-commerce/.agent/skills/ucp-orders-webhooks/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ucp-orders-webhooks/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ucp-orders-webhooks Compares

Feature / Agentucp-orders-webhooksStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

Manage the Saleor order lifecycle — order creation, fulfillments, returns, refunds, draft orders, and order events. Use when working with Saleor orders.

medusa-orders

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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.