Creating Disbursements

Flow for Creating Disbursements

1. Make sure that you have enough funds in your Xfers account

Before making any disbursements, check that you have sufficient funds in your Xfers account by logging into the Xfers Dashboard.

If there isn't enough funds, make a deposit by following the instructions you get from the dashboard Deposit flow.

2. Check the validity of the bank account you intend to send to

Before you request a fund transfer, make sure to check that the receiving bank account belongs to the person you intend to send to!

You can do this using our Bank Account Validation API. Check that the name of the bank account owner is the name of the person you intend to send money to.

# POST /api/v4/validation_services/bank_account_validation
{
  "data": {
    "attributes": {
      "accountName": "INKLUSI KEUANGAN NUSANTARA",
      "accountNo": "000501003219303",
      "bankShortCode": "BRI"
    }
  }
}

3. Request for a Disbursement once you're sure of the bank account validity

Create a disbursement by calling the Disbursements API with the following parameters:

  • amount
  • referenceId
  • description
  • disbursementMethod
curl https://sandbox-id.xfers.com/api/v4/disbursements/ \
  --header 'content-type: application/vnd.api+json' \
  -u test_xxxx:password \
  -d '
  {
    "data": {
      "attributes": {
        "amount": 100000,
        "referenceId": "order_id_123456",
        "description": "Your delivery payout.",
        "disbursementMethod": {
          "type": "bank_transfer",
          "bankShortCode": "BRI",
          "bankAccountNo": "0102030405",
          "bankAccountHolderName": "John Doe"
        }
      }
    }
  }
'

4. Xfers notifies you of the status of the Disbursement via callbacks

Once the disbursement status is confirmed, Xfers will notify your platform with callbacks that will notify you of the status of the Disbursement.

If you have not, make sure to set callback URLs on the Xfers Dashboard Callback Settings page.

{
  "data": {
    "id": "contract_4a2d252b059f4d13ab3568dd5ce3c344",
    "type": "disbursement",
    "attributes": {
      "referenceId": "order_id_123456",
      "description": "Your delivery payout.",
      "amount": "100000",
      "status": "completed",
      "createdAt": "2020-08-20T10:19:49+08:00",
      "fees": "3000",
      "disbursementMethod": {
        "type": "bank_transfer",
        "bankAccountNo": "0102030405",
        "bankShortCode": "BRI",
        "bankName": "Bank Rakyat Indonesia",
        "bankAccountHolderName": "John Doe",
        "serverBankAccountHolderName": "J Doe" // account holder name from the bank
      }
    }
  }
}

Did this page help you?