> ## 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.

# Check Instant Payout eligibility

Check whether the destination bank is reachable for SCT Inst payouts.

<Note>
  **Note – Endpoint only available for SCT Inst payouts in EUR**

  You can only use this endpoint to check payouts where:

  * The currency is `EUR`
  * The `PayoutModeRequested` is `INSTANT_PAYMENT`

  All other currencies return the [130001](/errors/codes/130001) `UnreachableReason.Code`.
</Note>

### Body parameters

<ParamField body="PayoutModeRequested" type="string" required>
  **Allowed values:** `INSTANT_PAYMENT`

  The mode of payout, which must be `INSTANT_PAYMENT` on this reachability endpoint, even if your subsequent payout request uses `INSTANT_PAYMENT_ONLY`.
</ParamField>

<ParamField body="AuthorId" type="string" required>
  The unique identifier of the user at the source of the transaction.\
  Best practice: When the payout author is different from the bank account owner, the Payout `AuthorId` value must be different from the Bank Account `UserId` value as well. Otherwise, Mangopay’s Compliance team will reject the payout.
</ParamField>

<ParamField body="DebitedFunds" type="object" required>
  Information about the debited funds.

  <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 debited 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>

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

  <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 debited 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>

<ParamField body="DebitedWalletId" type="string" required>
  The unique identifier of the debited wallet.
</ParamField>

<ParamField body="BankAccountId" type="string">
  The unique identifier of the Bank Account. This property should **not** be used by platforms integrating for the first time – send the `RecipientId` instead.
</ParamField>

<ParamField body="BankWireRef" type="string">
  Max. length: 255 characters (\< 12 recommended)

  Custom description to appear on the user’s bank statement along with the platform name. The recommended length is 12 characters – strings longer than this may be truncated depending on the bank.

  For the full structure of the string, see the <a href="/bank-statements">Customizing bank statement references</a> article.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200">
    <ResponseField name="IsReachable" type="boolean">
      Whether or not the bank is reachable.
    </ResponseField>

    <ResponseField name="UnreachableReason" type="object">
      Information regarding why the bank is unreachable.

      <Expandable title="properties">
        <ResponseField name="Code" type="string">
          The error code for the reason why the bank is not reachable.
        </ResponseField>

        <ResponseField name="Message" type="string">
          The reason why the bank is not reachable.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="400 - Instant payment disabled ">
    ```json theme={null}
    {
        "Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
        "Type":"param_error",
        "Id":"33e27bba-bb56-4d64-8574-cc1916a684c7#1661933575",
        "Date":1661933576.0,
        "errors":{
            "PayoutModeRequested":"InstantPayment is disabled"
        }
    }  
    ```
  </Accordion>

  <Accordion title="400 - PayoutModeRequested must be INSTANT_PAYMENT or INSTANT_PAYMENT_ONLY">
    ```json theme={null}
    {
        "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
        "Type": "param_error",
        "Id": "4b7c9558-d32e-44c0-88e2-d2d006141cc3",
        "Date": 1779263675.0,
        "errors": {
            "PayoutModeRequested": "The specified condition was not met for 'Payout Mode Requested'."
        }
    }
    ```
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json Reachable theme={null}
  {
      "InstantPayout": {
          "IsReachable": true,
          "UnreachableReason": null
      }
  }  
  ```

  ```json Not reachable theme={null}
  {
      "InstantPayout": {
          "IsReachable": false,
          "UnreachableReason": {
              "Code": "130007",
              "Message": "Destination Bank is not reachable"
          }
      }
  }
  ```

  ```json Insufficient wallet balance theme={null}
  {
      "InstantPayout": {
          "IsReachable": false,
          "UnreachableReason": {
              "Code": "001001",
              "Message": "Unsufficient wallet balance"
          }
      }
  }
  ```
</ResponseExample>

<RequestExample>
  ```json REST   theme={null}
  {
      "PayoutModeRequested":"INSTANT_PAYMENT",
      "AuthorId":"142036728",
      "DebitedFunds":{
          "Currency":"EUR",
          "Amount":1200
      },
      "Fees":{
          "Currency":"EUR",
          "Amount":12
      },
      "DebitedWalletId":"145389978",
      "BankAccountId":"54682154",
      "BankWireRef":"invoice 7282"
  }  
  ```

  ```javascript NodeJS  theme={null}
  const mangopayInstance = require('mangopay4-nodejs-sdk')
  const mangopay = new mangopayInstance({
    clientId: 'your-client-id',
    clientApiKey: 'your-api-key',
  })

  let myUser = {
    Id: 'user_m_01J2TZ261WZNDM0ZDRWGDYA4GN',
    WalletId: 'wlt_m_01J3D02K6ETV3BDP88C7PD2NDB',
  }

  let myBankAccount = {
    Id: 'bankacc_m_01J534QNZZSRCXXAJ1VXP58DDH',
  }

  let myPayout = {
    DebitedWalletId: myUser.WalletId,
    PaymentType: 'BANK_WIRE',
    BankAccountId: myBankAccount.Id,
    BankWireRef: 'Mangopay Ref',
    PayoutModeRequested: 'INSTANT_PAYMENT',
    AuthorId: myUser.Id,
    DebitedFunds: {
      Currency: 'EUR',
      Amount: 12,
    },
    Fees: {
      Currency: 'EUR',
      Amount: 0,
    },
    Tag: 'Created using Mangopay NodeJS SDK',
  }

  const checkInstantPayoutEligibility = async (payout) => {
    return await mangopay.PayOuts.checkEligibility(payout)
      .then((response) => {
        console.info(response)
        return response
      })
      .catch((err) => {
        console.log(err)
        return false
      })
  }

  checkInstantPayoutEligibility(myPayout)
  ```

  ```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.core.enumerations.PayoutMode;
  import com.mangopay.entities.PayOutEligibility;
  import com.mangopay.entities.PayOutEligibilityResult;

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

          var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR";
          var bankAccountId = "bankacc_m_01HTJ7P7Y8K9DS5SZ08MDQRHHE";
          
          PayOutEligibility eligibility = new PayOutEligibility();
          eligibility.setAuthorId(userId);
          eligibility.setDebitedFunds(new Money(CurrencyIso.EUR, 500));
          eligibility.setPayoutModeRequested(PayoutMode.INSTANT_PAYMENT);
          eligibility.setBankAccountId(bankAccountId);

          PayOutEligibilityResult result = mangopay.getPayOutApi().checkInstantPayoutEligibility(null, eligibility);

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

          System.out.println(prettyJson);
      }
  }
  ```

  ```ruby Ruby   theme={null}
  require 'mangopay'

  MangoPay.configure do |client|
      client.preproduction = true
      client.client_id = 'your-client-id'
      client.client_apiKey = 'your-api-key'
      client.log_file = File.join(Dir.pwd, 'mangopay.log')
  end

  def checkReachability(payoutObject)
      begin
          response = MangoPay::PayOut::InstantPayoutEligibility::Reachability.create(payoutObject)
          puts response
          return response
      rescue MangoPay::ResponseError => error
          puts "Failed to check reachability: #{error.message}"
          puts "Error details: #{error.details}"
          return false
      end
  end

  myUser = {
    Id: '146476890',
    WalletId: '148968396'
  }

  myBankAccount = {
    Id: '154876798'
  }

  myPayout = {
    DebitedWalletId: myUser[:WalletId],
    PaymentType: 'BANK_WIRE',
    BankAccountId: myBankAccount[:Id],
    BankWireRef: 'Mangopay Ref',
    PayoutModeRequested: 'INSTANT_PAYMENT',
    AuthorId: myUser[:Id],
    DebitedFunds: {
      Currency: 'EUR',
      Amount: 1200,
    },
    Fees: {
      Currency: 'EUR',
      Amount: 0,
    },
    Tag: 'Created using Mangopay Ruby SDK'
  }

  checkReachability(myPayout)  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using MangoPay.SDK.Entities;
  using MangoPay.SDK.Entities.POST;
  using MangoPay.SDK.Core.Enumerations;
  using Newtonsoft.Json;

  class Program
  {
      static async Task Main(string[] args)
      {
          MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

          var payout = new PayOutEligibilityPostDTO {
              AuthorId =  "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN",
              DebitedFunds = new Money { Amount = 1200, Currency = CurrencyIso.EUR },
              Fees = new Money { Amount = 12, Currency = CurrencyIso.EUR },
              PayoutModeRequested =  PayoutModeRequested.INSTANT_PAYMENT,
              BankAccountId = "bankacc_m_01J534QNZZSRCXXAJ1VXP58DDH",
              DebitedWalletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"
          };

          var checkEligibility = await api.PayOuts.CheckInstantPayoutEligibility(payout);

          string prettyPrint = JsonConvert.SerializeObject(checkEligibility, Formatting.Indented);
          Console.WriteLine(prettyPrint);
  	}
  }
  ```
</RequestExample>
