# 全額返金

ユーザーに支払いを返却するための返金リクエストを送信します。処理の詳細については、返金機能をお読みください。


メモこのAPIメソッドはサンドボックスモードで呼び出すことができます。そのためには、リクエストの中でテスト用の決済データを渡します。サンドボックスモードのアクセス方法とテストシナリオの詳細については、説明を参照してください。





通知APIコールにproject_idパスパラメータが含まれていないため、会社の全プロジェクトで有効なAPIキーを使用して認可を設定する必要があります。

Endpoint: PUT /merchants/{merchant_id}/reports/transactions/{transaction_id}/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)
    返金の理由。

  - `email` (string)
    ユーザーのEメール。

## Response 200 fields (application/json):

  - `message` (string)
    以下のいずれかのメッセージを返すことができます：
- No content.
- The request for a refund has been accepted. Xsolla CS will manually complete the refund. It may take up to two business days.
- 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.

## Response 404 fields (application/json):

  - `message` (string)
    トランザクションIDが有効ではありません。決済クレデンシャルを確認してください。それ以外の場合は、support@xsolla.comまでエクソラサポートにご連絡ください。

## Response 422 fields (application/json):

  - `message` (string)
    以下のいずれかのメッセージを返すことができます：
- We are processing the refund request. This may take up to two business days.
- We are reaching the user for the information required for the refund. For details, contact Xsolla Support.
- Incorrect payment status. Refund is possible only for payments with "completed" or "error" status.
- To process this request, the customer's email address field must be filled. Please specify the customer's email address and try again.
- Full refund is unavailable because there are successful partial refunds for this transaction.
- Refund failed. Please contact Xsolla Support to process it manually.
- Dispute for this invoice is already opened. Can’t make a refund yet.


## Response 204 fields

## Response 401 fields
