快工助手跨境电商知识与商机助手

Configuration guide

TikTok Shop 官方资料 · TikTok Shop Partner Center 开发者文档 · 适合开发者

stable本次发布有变化全部展示

来自 TikTok Shop 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
TikTok Shop / profile.tiktok.docs_api
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/tiktok_shopaudience/developercategory/api_doctopic/compliancetopic/developer

资料正文

§1 Configuration guide

Webhooks notify your HTTPS endpoint when subscribed TikTok Shop events occur. You can configure webhook subscriptions in Partner Center Console or with the Events API.

#

§2 Webhook configuration overview

There are two supported configuration methods:

MethodBest forWhere to manage it
Partner Center ConsoleManual setup, first-time setup, and visual confirmation of webhook URL and selected topics.Partner Center Console > App & Service > Select your app or service > Basic Information > Developing
Events APIProgrammatic shop-level webhook configuration, automation, or configuration sync across shops.PUT /event/202309/webhooks, GET /event/202309/webhooks, and DELETE /event/202309/webhooks

Use one operational source of truth for each app or shop. Partner Center and the Events API manage the same webhook configuration surface; changes made in one place can affect what you see in the other.

#

§3 Requirements

Before you configure webhooks, make sure that:

  • You understand the webhook event model and payload format. See Webhooks overview.
  • Your app has the API scopes and topic permissions required by the events you want to subscribe to.
  • Your receiving service exposes a reachable HTTPS endpoint that meets the webhook URL requirements below.
  • If you use the Events API, you can send signed TikTok Shop API requests and provide a valid x-tts-access-token when the endpoint requires it. See Sign your API request.
#

§4 Webhook URL requirements

RequirementDetails
SchemeUse https://.
TLSSupport TLS v1.2 or later.
HostUse a domain name. Do not use an IP address.
PortDo not include a custom port in the webhook URL.
Success acknowledgementReturn HTTP 200 within 3 seconds when the notification is accepted.
Authentication failureReturn HTTP 401 only when your service rejects the webhook signature or authentication. 401 is not a successful delivery acknowledgement.
#

§5 Method 1: Configure webhooks in Partner Center Console

Use this path for webhook URL and topic configuration:

Partner Center Console
  -> App & Service
  -> Select your app or service
  -> Basic Information
  -> Developing
  -> Webhook URL / Event subscriptions

Use Development Kits > Webhook Log only when you want to inspect delivery history. It is a monitoring entry, not the webhook configuration entry.

#

§6 Step 1: Configure the webhook URL

Add your HTTPS webhook receiver URL in the Developing section under Basic Information. Image creenshot reference: the webhook URL field is in the app or service configuration area, not in Development Kits.

Image

#

§7 Step 2: Choose webhook topics

Partner Center may preselect default webhook notifications for your app. The exact default set can vary by app type, market, seller type, and approved scopes, so confirm the selected default topics in the Partner Center subscription UI before launch. For optional topics, select only the events your integration actually handles. Common webhook categories include:

Topic categoryExample use caseSubscribe when
Order status updatesReceive a notification when an order is created or the order status changes.Your app syncs orders, fulfillment state, or order lifecycle changes.
Order recipient address updatesReceive a notification when order recipient address information changes.Your app needs to update shipping, warehouse, or fulfillment data after address changes.
Return, refund, or replacement updatesReceive a notification when a return, refund, or replacement status changes.Your app manages post-sales workflows.
Product status updatesReceive a notification when product status changes.Your app syncs product listing status or listing health.
Package or fulfillment updatesReceive package-related status changes when supported for your app and market.Your app manages fulfillment, shipment, or delivery workflows.
Authorization lifecycle eventsReceive UPCOMING_AUTHORIZATION_EXPIRATION or SELLER_DEAUTHORIZATION when supported.Your app stores seller authorization tokens and needs to maintain or stop shop access.

For the full and current event list, use the event list in Webhooks overview and the event-specific reference pages linked from that overview. Image creenshot reference: use this area to confirm which topics are selected by default and which optional topics you have enabled.

Image

#

§8 Step 3: Receive and verify webhook notifications

TikTok Shop sends an HTTP POST request to your configured URL when a subscribed event occurs. The request body contains JSON data for the event. TikTok Shop verifies SSL certificates when delivering payloads to HTTPS webhook addresses. Make sure your server certificate is valid and trusted. TikTok Shop places the webhook signature in the Authorization request header. This webhook signature is different from the signature you generate when your app calls TikTok Shop APIs. For webhook verification:

  1. Read the raw request body exactly as received.
  2. Concatenate {app_key}{raw_webhook_payload} with no added whitespace or reformatting.
  3. Use your app secret as the HMAC-SHA256 key.
  4. Compare the generated lowercase hexadecimal value with the Authorization header value.

Do not parse and re-serialize the JSON body before verification. Reformatting the body can change whitespace or field order and cause signature verification to fail. For the webhook signing example, see the Webhooks Header and Body section in Webhooks overview.

#

§9 Step 4: Respond to webhook notifications

Return a response within 3 seconds for each notification.

SituationHTTP statusBodyMeaningRetry behavior
Notification accepted and queued or processed200Empty bodySuccessful delivery acknowledgement.TikTok Shop treats the notification as delivered.
Signature or authentication failed401Empty bodyYour service rejected the notification. This is a valid semantic response for authentication failure, but not a success acknowledgement.Treat as failed delivery. TikTok Shop may retry according to the retry schedule.
Timeout, network failure, or other non-200 responseNon-200 or no responseAnyDelivery failed or was not acknowledged in time.TikTok Shop retries according to the retry schedule.

TikTok Shop stops retrying after the 4th retry failure.

RetryTrigger
1st retry2 minutes after the initial push failure
2nd retry30 minutes after the 1st retry failure
3rd retry3 hours after the 2nd retry failure
4th retry12 hours after the 3rd retry failure

Webhook delivery is at-least-once. Your listener must be idempotent because the same event can be delivered more than once during retries. Store and deduplicate by tts_notification_id when it is present in the payload. If an event-specific payload does not include tts_notification_id, use the most stable available combination, such as event type, shop_id, timestamp, and the business object ID.

#

§10 Method 2: Configure webhooks with the Events API

Use the Events API when you need to create, inspect, or delete webhook subscriptions programmatically. Before calling these APIs:

PrerequisiteWhat to check
API accessYour app must have access to the Events API and the event topic you are configuring. Check the endpoint reference and App & Service > Manage API for the required scope or permission.
Seller/shop authorizationUse a valid x-tts-access-token when the endpoint requires seller-scoped authorization.
Request signingInclude the required OpenAPI query parameters such as app_key, timestamp, and sign. Generate sign with the TikTok Shop API request signing rules.
Shop contextInclude shop_cipher when the endpoint or shop type requires a shop-level context.
Topic valueUse the exact event_type value from the event-specific reference page.

Events API configuration and Partner Center configuration are not mutually exclusive. They update the same underlying subscription configuration. If you call Update Shop Webhook for a shop and event that was configured manually, the API can update or replace that shop-event configuration. After any API change, call Get Shop Webhooks or check Partner Center to confirm the final state. Available Events API operations:

APIUse it for
Update Shop WebhookCreate or update a shop webhook subscription for a specific event. This corresponds to setting the callback URL and selected topic in Partner Center.
Get Shop WebhooksRetrieve existing shop webhook configurations and verify the current callback URL and event subscriptions.
Delete Shop WebhookCancel a shop webhook subscription for a specific event. Use this only when you intentionally want to stop receiving that event.
#

§11 Check webhook event history

Use this path to inspect webhook delivery logs:

Partner Center Console
  -> Development Kits
  -> Webhook Log
  -> Select the app or service

The webhook log is for monitoring and debugging delivery history. Use it to confirm whether TikTok Shop sent a notification, which callback URL was used, and what response your server returned. Screenshot reference: this screenshot shows the log and debugging entry under Development Kits, separate from the app configuration entry under App & Service > Developing.

Image

#