> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Bank Wire PayIn to the Repudiation Wallet

This endpoint allows the platform to make a Direct Bank Wire PayIn, instead of a Settlement Transfer, to their Repudiation Wallet in order to settle the negative balance due to a `LOST` dispute.

The object expires 1 month after creation if no funds are received.

<Warning>
  **Warning – Ensure you use the correct reference and bank account**

  The direct bank wire relies on independent action from the platform. You must use the `WireReference` and wire the funds to the bank account identified by the `IBAN` and `BIC`.\
  Otherwise, the crediting of your Repudiation Wallet may be delayed or unsuccessful.
</Warning>

### Body parameters

<ParamField body="CreditedWalletId" type="string" required>
  The unique identifier of the credited wallet.\
  In the case of the direct bank wire to the Repudiation Wallet, this value has the format `CREDIT_CCY` where `CCY` is the currency of the Client Wallet to be credited (e.g., `CREDIT_EUR`).
</ParamField>

<ParamField body="DeclaredDebitedFunds" type="object" required>
  Information about the declared funds to be wired by the platform to the returned bank account.

  <Expandable title="properties">
    <ParamField body="Currency" type="string" required>
      **Allowed values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

      The currency of the funds.
    </ParamField>

    <ParamField body="Amount" type="integer" required>
      An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
    </ParamField>
  </Expandable>
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200 - Status is CREATED">
    <ResponseField name="Id" type="string">
      Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)

      The unique identifier of the object.
    </ResponseField>

    <ResponseField name="Tag" type="string">
      Max. length: 255 characters

      Custom data that you can add to this object.\
      For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
    </ResponseField>

    <ResponseField name="CreationDate" type="Unix timestamp">
      The date and time at which the object was created.
    </ResponseField>

    <ResponseField name="ResultCode" type="string">
      The code indicating the result of the operation. This information is mostly used to <a href="/errors/codes">handle errors</a> or for filtering purposes.
    </ResponseField>

    <ResponseField name="ResultMessage" type="string">
      The explanation of the result code.
    </ResponseField>

    <ResponseField name="AuthorId" type="string">
      The unique identifier of the user at the source of the transaction.\
      In the case of the direct bank wire to the Repudiation Wallet, the `AuthorId` is automatically set to the platform’s `ClientId`.
    </ResponseField>

    <ResponseField name="CreditedUserId" type="string">
      The unique identifier of the user whose wallet is credited.\
      In the case of the direct bank wire to the Repudiation Wallet, the `CreditedUserId` is automatically set to the platform’s `ClientId`.
    </ResponseField>

    <ResponseField name="DebitedFunds" type="object">
      Information about the debited funds.

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the debited funds.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="CreditedFunds" type="object">
      Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`).

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the credited funds.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="Fees" type="object">
      Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).

      For a direct bank wire pay-in, the `Fees` displays placeholder values (currency `XXX` and amount `0`) until the `Status` changes to `SUCCEEDED`.

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the fees.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="Status" type="string">
      **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED`

      The status of the transaction.
    </ResponseField>

    <ResponseField name="ExecutionDate" type="Unix timestamp">
      The date and time at which the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`.
    </ResponseField>

    <ResponseField name="Type" type="string">
      **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT`

      The type of the transaction.
    </ResponseField>

    <ResponseField name="Nature" type="string">
      **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT`

      The nature of the transaction, providing more information about the context in which the transaction occurred:

      * `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow.
      * `REPUDIATION` – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback).
      * `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay).
      * `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute.
    </ResponseField>

    <ResponseField name="CreditedWalletId" type="string">
      The unique identifier of the credited wallet.\
      In the case of the direct bank wire to the Repudiation Wallet, this value has the format `CREDIT_CCY` where `CCY` is the currency of the Client Wallet to be credited (e.g., `CREDIT_EUR`).
    </ResponseField>

    <ResponseField name="DebitedWalletId" type="string">
      The unique identifier of the debited wallet.

      In the case of a pay-in, this value is always `null` since there is no debited wallet.
    </ResponseField>

    <ResponseField name="PaymentType" type="string">
      **Returned values:** `CARD`, `DIRECT_DEBIT`, `PREAUTHORIZED`, `BANK_WIRE`

      The type of pay-in.
    </ResponseField>

    <ResponseField name="ExecutionType" type="string">
      **Returned values:** `WEB`, `DIRECT`, `EXTERNAL_INSTRUCTION`

      The type of execution for the pay-in.
    </ResponseField>

    <ResponseField name="DeclaredDebitedFunds" type="object">
      Information about the declared funds to be wired by the platform to the returned bank account.

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the funds.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="DeclaredFees" type="object">
      Information about the fees to be taken by the platform for this transaction (and hence transferred to the Fees Wallet).

      <Expandable title="properties">
        <ResponseField name="Currency" type="string">
          **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

          The currency of the fees.
        </ResponseField>

        <ResponseField name="Amount" type="integer">
          An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="WireReference" type="string">
      Max. length: 255 characters

      The reference which the end user must provide when making the bank wire. The `WireReference` is used to reconcile the funds that arrive on the bank account with the `DeclaredDebitedFunds` in the Direct Bank Wire PayIn object.

      **Caution:** This reference is specific to each payment and must be retrieved dynamically.
    </ResponseField>

    <ResponseField name="BankAccount" type="object">
      Information about the bank account to which the bank wire must be made by the end user.

      **Caution:** Do not hardcode the returned values. Mangopay may change the underlying bank details without prior notice.

      <Expandable title="properties">
        <ResponseField name="OwnerAddress" type="object">
          Information about the address of residence of the bank account owner.

          <Expandable title="properties">
            <ResponseField name="AddressLine1" type="string">
              Max. length: 255 characters

              The first line of the address.
            </ResponseField>

            <ResponseField name="AddressLine2" type="string">
              Max. length: 255 characters

              The second line of the address.
            </ResponseField>

            <ResponseField name="City" type="string">
              Max. length: 255 characters

              The city of the address.
            </ResponseField>

            <ResponseField name="Region" type="string">
              Max. length: 255 characters

              The region of the address. This field is optional except if the `Country` is US, CA, or MX.
            </ResponseField>

            <ResponseField name="PostalCode" type="string">
              Max. length: 255 characters

              The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
            </ResponseField>

            <ResponseField name="Country" type="string">
              Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

              The country of the address.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="Type" type="string">
          **Returned values:** `IBAN`, `US`, `CA`, `GB`, `OTHER`

          The type of the bank account.
        </ResponseField>

        <ResponseField name="OwnerName" type="string">
          Max. length: 255 characters

          The full name of the owner of the bank account.
        </ResponseField>

        <ResponseField name="IBAN" type="string">
          The IBAN (international bank account number) for the bank account.
        </ResponseField>

        <ResponseField name="BIC" type="string">
          The BIC (international identifier of the bank) for the bank account.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200 - Status is CREATED   theme={null}
  {
      "Id": "163311508",
      "Tag": null,
      "CreationDate": 1677579888,
      "ResultCode": null,
      "ResultMessage": null,
      "AuthorId": "ClientId",
      "CreditedUserId": "ClientId",
      "DebitedFunds": {
          "Currency": "XXX",
          "Amount": 0
      },
      "CreditedFunds": {
          "Currency": "XXX",
          "Amount": 0
      },
      "Fees": {
          "Currency": "XXX",
          "Amount": 0
      },
      "Status": "CREATED",
      "ExecutionDate": null,
      "Type": "PAYIN",
      "Nature": "REGULAR",
      "CreditedWalletId": "CREDIT_EUR",
      "DebitedWalletId": null,
      "PaymentType": "BANK_WIRE",
      "ExecutionType": "DIRECT",
      "DeclaredDebitedFunds": {
          "Currency": "EUR",
          "Amount": 1000
      },
      "DeclaredFees": {
          "Currency": "EUR",
          "Amount": 0
      },
      "WireReference": "MGx5nyoxdi",
      "BankAccount": {
          "OwnerAddress": {
              "AddressLine1": "2 Avenue Amélie",
              "AddressLine2": null,
              "City": "Luxembourg",
              "Region": null,
              "PostalCode": "L-1125",
              "Country": "LU"
          },
          "Type": "IBAN",
          "OwnerName": "MANGOPAY SA",
          "IBAN": "FR7630056009271234567890182",
          "BIC": "CCFRFRPPXXX"
      }
  }  
  ```
</ResponseExample>

<RequestExample>
  ```json REST   theme={null}
  {
      "CreditedWalletId": "CREDIT_EUR",
      "DeclaredDebitedFunds": {
          "Currency": "EUR",
          "Amount": 1000
      }
  }  
  ```

  ```java Java  theme={null}
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.mangopay.MangoPayApi;
  import com.mangopay.core.Money;
  import com.mangopay.core.enumerations.CurrencyIso;
  import com.mangopay.entities.ClientBankWireDirect;
  import com.mangopay.entities.PayIn;

  public class CreateDirectBankWirePayInToRepudiationWallet {
    public static void main(String[] args) throws Exception {
        MangoPayApi mangopay = new MangoPayApi();
        mangopay.getConfig().setClientId("your-client-id");
        mangopay.getConfig().setClientPassword("your-api-key");

        ClientBankWireDirect bankwireDirectPayIn = new ClientBankWireDirect("CREDIT_EUR", new Money(CurrencyIso.EUR, 100));

        PayIn createPayIn = mangopay.getClientApi().createBankWireDirect(bankwireDirectPayIn);

        Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
        String prettyJson = prettyPrint.toJson(createPayIn);

        System.out.println(prettyJson);
    }
  }
  ```
</RequestExample>
