# 请求部分退款 向用户发送部分退款请求。关于退款流程和支持部分退款的支付方式的详细信息,请参阅我们的文档。 注:您可以在沙盒模式下调用此API方法,方法是在请求中传入测试支付的数据。关于沙盒模式访问和测试场景的详细信息,请参阅说明。 注意此API调用不包含project_id路径参数,因此您需要使用在您公司的所有项目中都有效的API密钥来设置授权。 Endpoint: PUT /merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund Version: 2.0 Security: basicAuth ## Path parameters: - `merchant_id` (integer, required) 商户ID。 - `transaction_id` (integer, required) 交易ID。 ## Request fields (application/json): - `description` (string, required) 退款原因。 - `refund_amount` (number, required) 以购买货币表示的退款金额。 ## Response 404 fields (application/json): - `message` (string) 不存在所指定ID的交易。请检查支付凭据。否则请发送邮件至support@xsolla.com与艾克索拉支持人员联系。 ## Response 422 fields (application/json): - `message` (string) 无法接受退款 返回以下消息之一: - Partial refund is unavailable for operations with user balance. - Requested transaction is partial refund and cannot be canceled. - Partial refund is unavailable for subscription payments. - Refund cannot be completed due to a payment system error. Please try again later. - Requested partial refund amount exceeds payment amount. - Requested partial refund amount is less than minimum amount specified by payment system. - Payment amount after partial refund will be less than allowable amount specified by payment system. - Dispute for this invoice is already opened. Can’t make a refund yet. 当前支付方式不支持部分退款 返回以下消息之一: - Current payment method does not support partial refunds. - Current transaction status does not allow refunds. - Deadline for refund is exceeded. - Partial refund is unavailable because discount was applied during payment creation. 由于精确度位数错误无法执行部分退款 返回以下消息: - Partial refund is unavailable because requested amount is specified with incorrect precision for purchase currency. ## Response 204 fields ## Response 403 fields