Xsolla-logo
  • 文档
  • 创建帐户

请求退款

put/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund

发送退款请求以向用户退款。详细过程请参阅退款功能

注:

您可以在沙盒模式下调用此API方法,方法是在请求中传入测试支付的数据。关于沙盒模式访问和测试场景的详细信息,请参阅说明

注意

此API调用不包含project_id路径参数,因此您需要使用在您公司的所有项目中都有效的API密钥来设置授权。

SecuritybasicAuth
Request
path Parameters
merchant_id
required
integer

商户ID。

transaction_id
required
integer

交易ID。

Request Body schema: application/json
description
required
string <= 4000 characters

退款原因。

email
string <= 100 characters

用户电子邮件。

Responses
200

OK.

204

已接受退款请求。

401

Unauthorized.

404

未找到交易。

422

Unprocessable Entity (请求参数无效) 。

Request samples
application/json
{
  • "description": "test refund request"
}
Response samples
application/json
{
  • "message": "The request for a refund has been accepted. Xsolla CS will automatically send the customer an email with alternative refund options as the user's method does not support direct refunds."
}