Xsolla-logo

Request refundServer-side

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

Sends a refund request to return a payment to a user. Read about the Refund feature to learn more about the process.

Note

You can call this API method in sandbox mode. To do this, pass the test payment data in the request. Refer to the instruction for more information about sandbox mode access and testing scenarios.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

SecuritybasicAuth
Request
path Parameters
merchant_id
required
integer

Merchant ID.

transaction_id
required
integer

Transaction ID.

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

Reason for a refund.

email
string <= 100 characters

User email.

Responses
200

OK (No error).

204

Refund request accepted.

401

Unauthorized (Access denied).

404

Transaction Not Found.

422

Unprocessable Entity (Invalid request parameters).

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."
}