tray-webhooks

Parse Tray webhook payloads, route by scope_name and act, and enqueue for async processing.

14|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tray-tecnologia/tray-api-claude-plugin --skill tray-webhooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tray-webhooks
Source: https://github.com/tray-tecnologia/tray-api-claude-plugin/tree/main/skills/webhooks
Command: npx skills add https://github.com/tray-tecnologia/tray-api-claude-plugin --skill tray-webhooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear instructions and best practices to receive, acknowledge, and reliably process real-time webhook notifications sent by Tray, removing ambiguity about payload format, retry behavior, and event routing so developers can keep external systems in sync.

Core Features & Use Cases

  • Scope-aware routing: Covers product, product_price, product_stock, variant, variant_price, variant_stock, order, customer and store_config events and how to route by scope_name + act.
  • Payload handling: Explains that Tray sends application/x-www-form-urlencoded POST payloads and shows how to parse seller_id, scope_id, scope_name and act.
  • Retry and resilience: Details Tray's non-200 retry behavior, progressive backoff, 20-day retention, and recommends immediate HTTP 200 responses, asynchronous processing, and idempotency handling.
  • MultiCD and payments: Notes MultiCD behavior for stock events and clarifies payment notification flow embedded in order objects.
  • Operational best practices: Recommends seller_id validation, logging for audit/debug, query-after-notify for canonical data, and queue-based background processing.

Quick Start

Use the tray-webhooks skill to generate an endpoint that returns HTTP 200 immediately, parses application/x-www-form-urlencoded payloads, routes events by scope_name and act, and enqueues them for asynchronous processing.

Frequently Asked Questions about tray-webhooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process Tray webhook notifications for real-time store updates?

Tray webhooks send application/x-www-form-urlencoded POST payloads containing seller_id, scope_id, scope_name, and act fields. You parse these parameters to identify the event type and route the notification data to the correct downstream processing logic.

Why does Tray keep retrying my webhook endpoint and how do I stop it?

Tray applies progressive backoff retries for up to 20 days when endpoints fail to return an immediate HTTP 200 status. Implement immediate HTTP 200 responses and asynchronous queue processing to prevent webhook retries.

How do I handle idempotency and seller_id validation for Tray webhooks?

Implement idempotency by validating seller_id upon receipt and tracking processed scope_id values to prevent duplicate execution. This ensures safe asynchronous processing of retried or duplicated webhook notifications.

What is the best way to route Tray order and product stock events?

Route Tray events by parsing the scope_name and act fields within the URL-encoded payload. This distinguishes product, product_stock, variant, order, customer, and store_config events, including MultiCD stock behavior and embedded payment notifications.

Do I need a queue for asynchronous processing of Tray webhook payloads?

A queue is required for asynchronous processing of Tray webhook payloads to return an immediate HTTP 200 response. This prevents timeout failures and respects Tray's retry backoff behavior while querying canonical data after notification.