Bỏ qua để đến nội dung

Webhooks

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

Webhooks

order.created

An order was created

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema OrderDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "order.created",
"payload": {
"order_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"external_ref": "string",
"currency": "string",
"total_amount_minor": 1,
"state": "draft"
}
}

order.confirmed

An order was confirmed

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema OrderDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "order.confirmed",
"payload": {
"order_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"external_ref": "string",
"currency": "string",
"total_amount_minor": 1,
"state": "confirmed"
}
}

order.paid

An order was paid

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema OrderDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "order.paid",
"payload": {
"order_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"external_ref": "string",
"currency": "string",
"total_amount_minor": 1,
"state": "paid"
}
}

order.cancelled

An order was cancelled

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema OrderDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "order.cancelled",
"payload": {
"order_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"external_ref": "string",
"currency": "string",
"total_amount_minor": 1,
"state": "cancelled"
}
}

order.refunded

An order was refunded

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema OrderDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "order.refunded",
"payload": {
"order_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"external_ref": "string",
"currency": "string",
"total_amount_minor": 1,
"state": "refunded"
}
}

product.updated

A product was created, changed or archived

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema ProductDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundProduct yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "product.updated",
"payload": {
"product_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"sku": "string",
"name": "string",
"kind": "string",
"active": false,
"template_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"options": [
{
"name": "string",
"value": "string"
}
]
}
}

price.updated

A product’s stored prices changed

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema PriceDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundPrice yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "price.updated",
"payload": {
"product_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"sku": "string",
"pricing_method": "fixed",
"package_size": 1,
"prices": [
{
"currency": "string",
"tiers": [
{}
]
}
]
}
}

customer.upserted

Another integration’s customer document was accepted

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema CustomerDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundCustomer yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "customer.upserted",
"payload": {
"customer_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"email": "string",
"phone": "string",
"display_name": "string"
}
}

inventory.updated

A unit’s stock level changed where Yedran counts it

Signed twice: X-Yedran-Timestamp + X-Yedran-Signature (v1, the canonical string) and webhook-id + webhook-timestamp + webhook-signature (Standard Webhooks, v1,<base64 HMAC-SHA256 of {id}.{timestamp}.{body}>), both keyed with the outbound secret. Answer 2xx; anything else is retried five times over a 15-minute window under the same delivery_id.

Body

Schema InventoryDelivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload InventoryDetail yes
{
"delivery_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"event_type": "inventory.updated",
"payload": {
"product_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"sku": "string",
"location_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"on_hand": "string",
"reserved": "string",
"available": "string",
"version": 1,
"updated_at": "2026-10-02T09:00:00Z"
}
}

Schemas

OrderDelivery

An order.* delivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundOrder yes

ProductDelivery

A product.updated delivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundProduct yes

PriceDelivery

A price.updated delivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundPrice yes

CustomerDelivery

A customer.upserted delivery.

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload OutboundCustomer yes

InventoryDelivery

An inventory.updated delivery (0178).

Field Type Required Description
delivery_id string (uuid) yes
event_id string (uuid) yes
event_type string yes
payload InventoryDetail yes

OutboundOrder

The payload of every order.* delivery — commercial_events.order_detail.

Field Type Required Description
order_id string (uuid) yes
external_ref string, nullable yes
currency string yes
total_amount_minor integer yes
state OrderState yes

OutboundProduct

The payload of product.updated — commercial_events.product_detail. No price.

template_id and options since 0177 (additive): the product a customer sees, and this variant’s value of each of its options ([] without).

Field Type Required Description
product_id string (uuid) yes
sku string yes
name string yes
kind string yes
active boolean yes
template_id string (uuid) yes
options array of OptionValueV2 yes

OutboundPrice

The payload of price.updated — pricing_service.price_detail: stored prices only.

Field Type Required Description
product_id string (uuid) yes
sku string yes
pricing_method one of fixed, volume, graduated, package yes
package_size integer, nullable yes
prices array of OutboundPriceLadder yes

OutboundCustomer

The payload of customer.upserted: our customer id and the document that was accepted.

Field Type Required Description
customer_id string (uuid) yes
email string, nullable yes
phone string, nullable yes
display_name string, nullable yes

InventoryDetail

The payload of inventory.updated — stock.inventory_detail: quantities as decimal strings.

Field Type Required Description
product_id string (uuid) yes
sku string yes
location_id string (uuid) yes
on_hand string yes
reserved string yes
available string yes
version integer yes
updated_at string (date-time) yes

OrderState

The six states migration 0099’s CHECK constraint admits.

One of draft, confirmed, paid, fulfilled, cancelled, refunded.

OptionValueV2

One variant’s value of one option, by text: {"name": "Color", "value": "Red"}.

Field Type Required Description
name string yes
value string yes

OutboundPriceLadder

A product’s whole stored ladder in one currency.

Field Type Required Description
currency string yes
tiers array of OutboundPriceTier yes

OutboundPriceTier

One quantity break of a stored price; discount_pct is a decimal string or null.

Field Type Required Description
min_quantity integer yes
unit_amount_minor integer yes
discount_pct string, nullable yes