Skip to content

Disbursement

Create Disbursement

Disbursement is a way for you to transfer money from Xendit without needing to do it from your account and we can do it to 100+ bank on Indonesia. Please kindly follow these steps below to create disbursement:

  1. Input your callback URL in Xendit Dashboard > Settings > Configuration > Dsibursement
  2. Get available destination bank for you to disburse your prefered amount of money with this code below:
    1
    AvailableBank[] availableBanks = Disbursement.getAvailableBank();
    
  3. Take the available bank that you want (in this example below, we take the first data appearing to the available bank)
    1
    AvailableBank destinationBank = availableBanks[0];
    
  4. There are several option in creating the disbursement from Xendit, you can do it with:
    1. Create disbursement with Map object
      1. Create a Map object with String as a key and Object as the value, like this:
        1
        Map<String, Object> disbursementMap = new HashMap<String, Object>();
        
      2. Input the map data item with these fields below:
        1. external_id = ID of the disbursement in your system, used to reconcile disbursements after they have been completed.
        2. bank_code = bank destination code that we provice on getAvailableBank method or you can get it from here
        3. account_holder_name = Name of account holder as per the bank's or e-wallet's records. Used for verification and error/customer support scenarios.
        4. account_number = Destination bank account number. If disbursing to an e-wallet, phone number registered with the e-wallet account.
        5. description = Description to send with the disbursement
        6. amount = Amount to disburse
      3. Create your disbursement with this syntax:
        1
        Disbursement disbursement = Disbursement.create(disbursementMap);
        
    2. Create disbursement with required params
      1. Create your disbursement with this syntax:
        1
        Disbursement disbursement2 = Disbursement.create("my_external_id", destinationBank.getCode(), "John Doe", "1234567890", "description", new BigInteger("90000"));
        
      2. The required parameters are:
        1. external_id = [String] - ID of the disbursement in your system, used to reconcile disbursements after they have been completed.
        2. bank_code = [String] - bank destination code that we provice on getAvailableBank method or you can get it from here
        3. account_holder_name = [String] - Name of account holder as per the bank's or e-wallet's records. Used for verification and error/customer support scenarios.
        4. account_number = [String] - Destination bank account number. If disbursing to an e-wallet, phone number registered with the e-wallet account.
        5. description = [String] - Description to send with the disbursement
        6. amount = [BigInteger] - Amount to disburse
    3. Create disbursement with required params and email destination for sending the transfer receipt
      1. Create your disbursement with this syntax:
        1
        Disbursement disbursement2 = Disbursement.create("my_external_id", destinationBank.getCode(), "John Doe", "1234567890", "description", new BigInteger("90000"),new String[]{"john@doe.com"});
        
      2. The required parameters are:
        1. external_id = [String] - ID of the disbursement in your system, used to reconcile disbursements after they have been completed.
        2. bank_code = [String] - bank destination code that we provice on getAvailableBank method or you can get it from here
        3. account_holder_name = [String] - Name of account holder as per the bank's or e-wallet's records. Used for verification and error/customer support scenarios.
        4. account_number = [String] - Destination bank account number. If disbursing to an e-wallet, phone number registered with the e-wallet account.
        5. description = [String] - Description to send with the disbursement
        6. amount = [BigInteger] - Amount to disburse
      3. Additional parameter in this method:
        1. emailTo = [Array of String] - Recipient of transfer receipt, Maximum 3 recipient.
    4. Create disbursement with required params and email and CC destination for sending the transfer receipt
      1. Create your disbursement with this syntax:
        1
        Disbursement disbursement2 = Disbursement.create("my_external_id", destinationBank.getCode(), "John Doe", "1234567890", "description", new BigInteger("90000"),new String[]{"john@doe.com"},new String[]{"doe@john.com"});
        
      2. The required parameters are:
        1. external_id = [String] - ID of the disbursement in your system, used to reconcile disbursements after they have been completed.
        2. bank_code = [String] - bank destination code that we provice on getAvailableBank method or you can get it from here
        3. account_holder_name = [String] - Name of account holder as per the bank's or e-wallet's records. Used for verification and error/customer support scenarios.
        4. account_number = [String] - Destination bank account number. If disbursing to an e-wallet, phone number registered with the e-wallet account.
        5. description = [String] - Description to send with the disbursement
        6. amount = [BigInteger] - Amount to disburse
      3. Additional parameter in this method:
        1. emailTo = [Array of String] - Recipient of transfer receipt, Maximum 3 recipient.
        2. emailCc = [Array of String] - Email addresses that get notified as carbon copy receiver of disbursement details after the disbursement is completed.Maximum 3 email addresses accepted. Only allowed if email_to provided.
    5. Create disbursement with required params and email, CC and BCC destination for sending the transfer receipt
      1. Create your disbursement with this syntax:
        1
        Disbursement disbursement2 = Disbursement.create("my_external_id", destinationBank.getCode(), "John Doe", "1234567890", "description", new BigInteger("90000"),new String[]{"john@doe.com"},new String[]{"doe@john.com"},new String[]{"john@john.com"});
        
      2. The required parameters are:
        1. external_id = [String] - ID of the disbursement in your system, used to reconcile disbursements after they have been completed.
        2. bank_code = [String] - bank destination code that we provice on getAvailableBank method or you can get it from here
        3. account_holder_name = [String] - Name of account holder as per the bank's or e-wallet's records. Used for verification and error/customer support scenarios.
        4. account_number = [String] - Destination bank account number. If disbursing to an e-wallet, phone number registered with the e-wallet account.
        5. description = [String] - Description to send with the disbursement
        6. amount = [BigInteger] - Amount to disburse
      3. Additional parameter in this method:
        1. emailTo = [Array of String] - Recipient of transfer receipt, Maximum 3 recipient.
        2. emailCc = [Array of String] - Email addresses that get notified as carbon copy receiver of disbursement details after the disbursement is completed.Maximum 3 email addresses accepted. Only allowed if email_to provided.
        3. emailBcc = [Array of String] - Email addresses that get notified as blind carbon copy receiver of disbursement details after the disbursement is completed.Maximum 3 email addresses accepted. Only allowed if email_to provided.
  5. We will process your disbursement after you trigger the create disbursement method and will send you callback with disbursement status as:
    1. SUCCESS - your disbursement is successful
    2. FAILED - please check failure_code and refer to Error Codes (Callbacks) in here