当用户与商店交互时,艾克索拉会将包含用户和项目参数的partner_side_catalog webhook发送到webhook URL。
返回适用于该用户的item_id或商品SKU的列表。您也可以在其中包含指定用户对指定商品的可购买次数的信息。此功能允许您控制用户可添加 到购物车及可购买的商品种类和次数。
注意
处理Webhook时,请注意以下限制:
- Webhook必须在3秒内处理完成。如果处理时间超过3秒,获取虚拟物品列表、创建支付令牌和创建订单API调用将返回错误。
- Webhook响应大小不得超过64KB。超过该限制的响应不会被处理,用户将看到空目录,且无法购买任何物品。如需调整响应大小上限,请联系您的客户成功经理,或发送电子邮件至[email protected]。
- https://api.xsolla.com/merchant/v2https://api.xsolla.com/merchant/v2/personalized-partner-catalog
- Mock serverhttps://xsolla.redocly.app/_mock/zh/webhooks/personalized-partner-catalog
{ "user": { "country": "string", "currency": "string", "locale": "string", "user_id": "string" } }
Response
[ { "date_from": "2024-08-11T23:59:59+08:00", "date_until": "2024-08-12T23:59:59+08:00", "quantity": 0, "sku": "com.xsolla.boots_1" }, { "date_from": "2024-08-11T23:59:59+08:00", "date_until": "2024-08-12T23:59:59+08:00", "quantity": null, "sku": "com.xsolla.sword_1" }, { "quantity": 1, "sku": "com.xsolla.helmet_1" }, { "content": [ … ], "description": "Custom description", "image_url": "https://example.com/image.png", "json_attributes": { … }, "name": "Custom name", "quantity": null, "sku": "com.xsolla.custom_item_1" }, { "available": 7, "sku": "com.xsolla.limited_item_1", "total": 10 } ]