Skip to content

feat: implement spec-mandated Webhook-Timestamp and Webhook-Id headers for orderEvent webhook #147

Description

@damaz91

The UCP specification (specifically in rest.openapi.json under webhooks.orderEvent) requires the following headers to be sent with the orderEvent webhook:

  • Webhook-Timestamp: Webhook event occurrence unix timestamp (seconds since epoch).
  • Webhook-Id: The unique identifier of a webhook event (UUID).

Currently, neither the Python server (rest/python/server/services/checkout_service.py) nor the Node.js server (rest/nodejs/src/api/checkout.ts) sends these headers. They only send a custom X-Event-Type header.

We should update both implementations to generate and send these spec-mandated headers:

  1. Generate a unique UUID for Webhook-Id for each event.
  2. Generate the current Unix timestamp for Webhook-Timestamp.
  3. Include these headers in the POST request to the webhook URL.
  4. Update the corresponding integration tests to assert these headers are present and have correct formats.

This will ensure the sample implementations are fully compliant with the UCP webhook specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions