Xsolla-logo
  • 文档
  • 创建帐户

已更新订阅Webhook POST

如果订阅中的某些参数(plan_iddate_next_charge)发生更改,以及每次订阅续订时,艾克索拉都会向Webhook URL发送一个update_subscription类型的Webhook。

Request
Request Body schema: application/json
notification_type
required
string

通知类型。

object

带有自定义项目设置的对象。

merchant_id
integer

商户ID。

project_id
integer

项目编号。您可以在您的发布商帐户项目名称旁边。

object

订阅详情(对象)。

date_next_charge
string

下次收费的日期。符合ISO 8601标准规定的日期与时间。

plan_id
string

计划ID(如果计划通过API创建,则为外部ID)。

product_id
string

产品ID(如果在访问令牌中发送)。

subscription_id
integer

艾克索拉数据库的订阅ID。

tags
Array of strings

计划标签。

object

用户详情(对象)。

id
required
string

用户ID。

name
string

用户名。

Responses
204

返回以指示处理成功。

400

提供的信息出错时返回(例如,缺少必需的参数、授权失败等)。

500

返回以指示您的服务器存在的暂时性错误。

Request samples
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
        "notification_type": "update_subscription",
        "settings": {
          "project_id": 18404,
          "merchant_id": 2340
        },
        "user": {
            "id": "1234567",
            "name": "John Smith"
        },
        "subscription": {
            "plan_id": "b5dac9c8",
            "subscription_id": "10",
            "product_id": "Demo Product",
            "date_next_charge": "2015-01-22T19:25:25+04:00"
        }
    }'
Response samples
application/json
{
  • "error": {
    }
}