Xsolla-logoXsolla Developers
前往发布商帐户

为付费优惠链步骤创建订单Client-side

post/v2/project/{project_id}/user/offer_chain/{offer_chain_id}/step/number/{step_number}/order

为指定的付费优惠链步骤关联的商品创建订单。所创建订单的状态为new

若要在新窗口中打开支付UI,请使用以下链接:https://secure.xsolla.com/paystation4/?token={token},其中{token}为收到的令牌。

对于测试目的,请使用此URL:https://sandbox-secure.xsolla.com/paystation4/?token={token}

注意

此方法必须在客户端侧使用。用户的IP地址用于确定所在国家/地区,这会影响适用货币和可用的支付方式。从服务器侧使用此方法可能会导致货币检测错误,并影响支付中心里的支付方式。

注意

此调用仅适用于付费优惠链步骤。 对于免费步骤,请改用领取免费优惠链步骤奖励调用。
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 44056
offer_chain_id
required
integer

优惠链ID。

Example: 101
step_number
required
integer

优惠链步骤编号。

Example: 1
Responses
200

订单已成功创建。

401

认证未通过或错误。

404

未找到优惠链或步骤。

422

该步骤不可购买。

Request samples
Response samples
application/json
{
  • "order_id": 641,
  • "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo"
}