Xsolla-logo
  • 文档
  • 创建帐户

通过已保存的帐户收费

post/projects/{project_id}/users/{user_id}/payments/{type}/{account_id}

使用已保存的支付帐户收费。

注意

为使API调用正常工作,请配置一个2分钟的超时时间。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

项目ID。

user_id
required
string

存储在己侧的游戏内唯一用户ID。请确保传入现有用户ID。如遇到错误,请参阅常见问题回答

type
required
string

支付帐户类型。

Enum: Description
alipayplus_boost

Boost。

alipayplus_cn

支付宝。

alipayplus_dana

DANA。

alipayplus_gcash

GCash。

alipayplus_hk

Alipay HK。

alipayplus_rabbitlinepay

Rabbit LINE pay。

alipayplus_tng

Touch 'n Go。

alipayplus_truemoney

TrueMoney Wallet。

amazon

Amazon Pay。

card

银行卡。

klarna

Klarna。保存支付帐户只适用于美国、英国、瑞典、德国、奥地利、挪威、芬兰、丹麦、荷兰。

paypal

PayPal。

paysafecard_eu

Paysafecard(欧盟)。

paysafecard_us

Paysafecard(美国)。

skrill

Skrill Digital Wallet。

softbank_paypay

PayPay。

toss

Toss Wallet。

account_id
required
integer

艾克索拉数据库中已保存的帐户的ID。

Request Body schema: application/json
object

此对象包含配置防欺诈筛选条件的参数。参数列表如下所示。要添加自定义参数,请联系您的客户成功经理或发送邮件至csm@xsolla.com

active_date
string

上一次出现日期(按照ISO 8601格式)。

additional_verification
boolean

玩家是否使用了帐户验证流程。

character_customized
boolean

玩家是否对角色进行了自定义。

chat_activity
boolean

玩家是否使用了聊天功能。

completed_tasks
integer

完成的任务/目标数。

forum_activity
boolean

玩家是否使用了论坛功能。

items_used
boolean

玩家是否使用了购买的游戏装备。

karma_points
integer

玩家的贡献/业力。

last_change_password_date
string

上一次出现日期(按照ISO 8601格式)。

non_premium_currency
number <float>

非高级货币数量。

notifications_enabled
boolean

玩家是否启用了通知。

profile_completed
boolean

玩家在帐户资料中是否添加了其它信息。

profile_image_added
boolean

玩家是否上传了简介头像。

pvp_activity
boolean

玩家是否参与了玩家对战。

registration_date
string

上一次出现日期(按照ISO 8601格式)。

session_time
string

上一次出现日期(按照ISO 8601格式)。

social_networks_added
boolean

玩家是否有关联的社交媒体帐户资料。

total_bans
integer

玩家在聊天/论坛中被禁言的次数。

total_characters
integer

游戏角色数。

total_clans
integer

玩家所属的家族数。

total_friends
integer

好友数。

total_game_events
integer

玩家参与的游戏事件数。

total_gifts
integer

玩家发出/收到的游戏礼物数。

total_hours
integer

游戏总时数。

total_inventory_value
number <float>

库存总值(以游戏货币为单位)。

total_sum
number <float>

付款总额。

tutorial_completed
boolean

玩家是否完成了游戏教程。

unlocked_achievements
integer

未解锁的通关数。

user_level
integer

玩家的等级、口碑或排名。

win_rate
integer

赢率。

object

带有购买相关数据的对象。

object

带有结账参数相关数据的对象。

amount
number <float>

购买金额。

currency
string

购买币种。参照ISO 4217标准的三字母货币代码。

object <= 4000 characters
value
string
object

带有虚拟货币相关数据的对象。

quantity
number <float>

使用虚拟货币购买的数量。

object

带有购买设置相关数据的对象。

mock_code
integer

在沙盒模式下测试PayPal支付处理时希望重现的错误代码。仅当传入了"mode":"sandbox"参数时才能正确工作。

Enum: 1057 1015 3006 1801 1803 1039 3031 1203 3006 1201 1002 1089 2031 1046 5004
mode
string

设置sandbox值以测试支付流程。对于真实支付,应移除此参数。

object

带用户相关数据的对象。

ip
required
string

用户IP。

object

包含法律实体详细信息的对象。

address
string

完整法定地址。

country
string

公司所在国家/地区。参照ISO 3166-1 alpha-2标准的两个大写字母表示的国家/地区代码。

name
string

完整法定名称。

vat_id
string

个人纳税人识别号。

name
string

用户名。

Responses
201

Created.

422

Unprocessable Entity.

Request samples
application/json
{
  • "card": {
    },
  • "purchase": {
    },
  • "settings": {
    },
  • "user": {
    }
}
Response samples
application/json
{
  • "transaction_id": 123458390
}