kyc.unverified
Type: Webhook
Method: POST
Tags: Customers
Summary
Customer KYC unverified
Description
Fires when a required document is missing or rejected.
TypeScript Definition
typescript
"kyc-unverified": {
parameters: {
query?: never;
header: {
/** @description Event name; equals the body `event`. */
"X-CE-Event": components["parameters"]["WebhookEventHeader"];
/** @description `sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook secret. Verify with a constant-time comparison before processing. */
"X-CE-Signature": components["parameters"]["WebhookSignatureHeader"];
/** @description Equals the body `event_id`. Stable across retries — use as the idempotency key. */
"X-CE-Event-ID": components["parameters"]["WebhookEventIdHeader"];
/** @description Equals the body `delivery_id`. Unique per delivery attempt. */
"X-CE-Delivery-ID": components["parameters"]["WebhookDeliveryIdHeader"];
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["WebhookEnvelope"] & {
/** @enum {string} */
event?: "kyc.unverified";
payload?: {
/** @enum {string} */
event?: "kyc.unverified";
properties?: components["schemas"]["Customer"] & {
/** @description The customer's attribute values, by attribute slug: the store's own (`custom`) attributes and those Commerce Engine sets (`system`, such as `initial-utm-source` and `utm-source`). An attribute with no value is left out, and so are attributes linked to KYC documents: their changes come with the `kyc.document.*` events. */
attributes: {
[key: string]: unknown;
};
/** @description The customer's own data as key-value pairs, set by admins and by the customer's users; `null` when none was ever set. */
metadata: {
[key: string]: unknown;
} | null;
/** @description Private sellers the customer is authorized to buy from. */
authorized_seller_ids: string[];
/** @description Public sellers the customer is restricted from buying from. */
restricted_seller_ids: string[];
};
customer_id: string;
};
};
};
};
responses: {
200: components["responses"]["WebhookAccepted"];
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
410: components["responses"]["WebhookGone"];
"2XX": components["responses"]["WebhookAccepted"];
"5XX": components["responses"]["WebhookServerError"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["parameters"]["WebhookEventHeader"] | WebhookEventHeader |
components["parameters"]["WebhookSignatureHeader"] | WebhookSignatureHeader |
components["parameters"]["WebhookEventIdHeader"] | WebhookEventIdHeader |
components["parameters"]["WebhookDeliveryIdHeader"] | WebhookDeliveryIdHeader |
components["schemas"]["WebhookEnvelope"] | WebhookEnvelope |
components["schemas"]["Customer"] | Customer |
components["responses"]["WebhookAccepted"] | WebhookAccepted |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["WebhookGone"] | WebhookGone |
components["responses"]["WebhookServerError"] | WebhookServerError |
Webhook Payload
Content Types: application/json
Expected Responses
200
400
Bad request
401
Not authorized for given operation on the Resource
410
2XX
5XX
OpenAPI Definition
json
{
"tags": [
"Customers"
],
"operationId": "kyc-unverified",
"summary": "Customer KYC unverified",
"description": "Fires when a required document is missing or rejected.",
"parameters": [
{
"$ref": "#/components/parameters/WebhookEventHeader"
},
{
"$ref": "#/components/parameters/WebhookSignatureHeader"
},
{
"$ref": "#/components/parameters/WebhookEventIdHeader"
},
{
"$ref": "#/components/parameters/WebhookDeliveryIdHeader"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/WebhookEnvelope"
},
{
"type": "object",
"properties": {
"event": {
"type": "string",
"enum": [
"kyc.unverified"
]
},
"payload": {
"type": "object",
"properties": {
"event": {
"type": "string",
"enum": [
"kyc.unverified"
]
},
"properties": {
"allOf": [
{
"$ref": "#/components/schemas/Customer"
},
{
"type": "object",
"properties": {
"attributes": {
"description": "The customer's attribute values, by attribute slug: the store's own (`custom`) attributes and those Commerce Engine sets (`system`, such as `initial-utm-source` and `utm-source`). An attribute with no value is left out, and so are attributes linked to KYC documents: their changes come with the `kyc.document.*` events.",
"type": "object",
"additionalProperties": {
"description": "The attribute's value, of the attribute's type."
}
},
"metadata": {
"description": "The customer's own data as key-value pairs, set by admins and by the customer's users; `null` when none was ever set.",
"type": [
"object",
"null"
],
"additionalProperties": true
},
"authorized_seller_ids": {
"description": "Private sellers the customer is authorized to buy from.",
"type": "array",
"items": {
"type": "string"
}
},
"restricted_seller_ids": {
"description": "Public sellers the customer is restricted from buying from.",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"attributes",
"metadata",
"authorized_seller_ids",
"restricted_seller_ids"
]
}
]
},
"customer_id": {
"type": "string"
}
},
"required": [
"customer_id"
]
}
}
}
]
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/WebhookAccepted"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"410": {
"$ref": "#/components/responses/WebhookGone"
},
"2XX": {
"$ref": "#/components/responses/WebhookAccepted"
},
"5XX": {
"$ref": "#/components/responses/WebhookServerError"
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions